一.导航条
<style type="text/css">
.nav{
width: 100%;
background: skyblue;
float: left;
height: 50px;
}
ul{
list-style: none;
float: left;
margin-top: 0;
}
li{
float: left;
width: 80px;
text-align: center;
background: skyblue;
border-right: 1px solid gold;
height: 50px;
line-height: 50px;
}
a{
text-decoration: none;
color: #808080;
font-size: 30px;
display: block;
width: 100%;
height:100%;
}
a:hover{
background: orange;
color: white;
}
</style>
</head>
<body>
<div class="nav">
<ul>
<li><a href="#">内容</a></li>
<li><a href="#">内容</a></li>
<li><a href="#">内容</a></li>
<li><a href="#">内容</a></li>
<li><a href="#">内容</a></li>
<li><a href="#">内容</a></li>
<li><a href="#">内容</a></li>
<li><a href="#">内容</a></li>
</ul>
</div>
</body>
二.属性选择器
[id]:所有id
[class=‘one’] :class等于one的值
[title]:所有有title属性的
[title^=‘aa’]:以aa开头的
[title=‘d’]:包含d的
[title$=‘d’]:以d结尾的
[class~=‘two’]:class里面包含two且有空格的
<style type="text/css">
/*具有id属性的元素,