<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style>
/* 选择器的种类分为 */
/* 常规 */
div{
color: red;
}
/* 复合 */
div.green{
color:green
}
div,span{
color:slategrey
}
/* 关系 */
div>span{
color:rosybrown ;
}
/* 属性 */
div[title]{
color: royalblue;
}
div[title=abc]{
color: royalblue;
}
div[title^=abc]{
color: royalblue;
}
div[title$=abc]{
color: royalblue;
}
div[title*=abc]{
color: royalblue;
}
/* 伪类 */
ul>li:first-of-type{
color:salmon
}
ul>li:first-child{
color: sandybrown;
}
ul>li:nth-child(nmber){
color:seagreen
}
ul>li:nth-of-type(number){
color:silver
}
</style>
</head>
<body>
</body>
</html>