CSS系列:CSS3新增选择器
CSS系列:CSS3新增选择器
body {
font-size: 12px;
}
ul, li {
list-style: none;
}
li {
height: 22px;
line-height: 22px;
}
a {
text-decoration: none;
color: #E47911;
}
a[href$="docx"] {
background: url(/Content/icon/word.png) no-repeat;
padding-left: 20px;
}
a[href$="xlsx"] {
background: url(/Content/icon/excel.png) no-repeat;
padding-left: 20px;
}
a[href$="pptx"] {
background: url(/Content/icon/powerpoint.png) no-repeat;
padding-left: 20px;
}
a[href$="pst"] {
background: url(/Content/icon/outlook.png) no-repeat;
padding-left: 20px;
}
结构伪类利用DOM实现元素过滤,通过DOM的相互关系来匹配特定的元素,减少文档内对class属性和ID属性的定义,使得文档更加简洁。
table {
table-layout: fixed;
border-collapse: collapse;
empty-cells: show;
}
tr:nth-child(even) {
background-color: #f5f5f5;
}
.content {
border-radius: 5px;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
}