138   CSS

1,ID选择
#id {
color:red;
}
2,class选择
.class {
color:red;
}
3,所有后代选择
div p {
color:red;
}
4,仅限子元素选择
div>p {
color:red;
}
5,属性选择器
[title] {
color:red;
}
6,属性值选择器
[title=’hello’]{
color:red;
}
7,属性值匹配选择器
[title*=’hello’]{
color:red;
}
8,标签属性选择器
input[name=’password’]{
color:red;
}



Leave a Reply

Your email address will not be published. Required fields are marked *