CSS 基礎內容
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>TTUCSCEC</title>
<link rel="stylesheet" href="style.css" />
</head>
<body>
<header>
<nav>這是導覽列</nav>
</header>
<main>
<p>一些文章內容</p>
<span id="article"></span>
<img src="http://i.imgur.com/gGJTxxw.jpg" class="bold">
</main>
<footer>
<p>TTUCSCEC ©2015 All Rights Reserved.</p>
</footer>
<script>
</script>
</body>
</html>
body{
background:#fff;
}
#doraemon{
position:relative;
margin:50px;
}
#head_light{
width:50px;
height:50px;
transform: rotate(20deg);
-webkit-transform: rotate(20deg);
-moz-transform: rotate(20deg);
-o-transform: rotate(20deg);
-ms-transform: rotate(20deg);
box-shadow:80px 20px 50px #fff;
-webkit-box-shadow:80px 20px 55px #fff;
-moz-box-shadow:80px 20px 50px #fff;
border-radius:45px;
-webkit-border-radius:45px;
-moz-border-radius:60px;
position:absolute;
top:-20px;
left:170px;
opacity:0.5
}
選擇器
宣告
屬性
宣告
屬性
值
值
p {
text-align: center;
color: red;
}
#para1 {
text-align: center;
color: red;
}
.center {
text-align: center;
color: red;
}
h1, h2, p {
text-align: center;
color: red;
}
<!DOCTYPE html>
<html>
<head>
<style>
div {
background-color: lightgrey;
width: 300px;
padding: 25px;
border: 25px solid navy;
margin: 25px;
}
</style>
</head>
<body>
<div>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</div>
</body>
</html>
body {
background-color: lightgray;
}
#article {
display: block;
margin: 1px 2px;
color: orange;
}
.bold {
border-style: dashed;
border-radius: 100%;
border-color: rgba(0, 188, 212, 0.1);
}