intersection selector

 交集选择器

1
<!DOCTYPE html> 2 <html lang="en"> 3 <head> 4 <meta charset="UTF-8"> 5 <title>Document</title> 6 <style type="text/css"> 7 .logo{ 8 font-size:60px; 9 color:#009966; 10 } 11 div.logo{ 12 background-color:pink; 13 } 14 #miss{ 15 width:180px; 16 height:100px; 17 background-color:rgb(00,88,55); 18 } 19 div#miss{ 20 text-indent:2em; 21 } 22 </style> 23 </head> 24 <body > 25 < div class ="logo" > Intersection selector </ div > 26 < p class ="logo" > Writing and features </ p > 27 < div id ="miss" > Attribute value </ div > 28 </ body > 29 </ html >


Compound selector:
◆ Two or more basic selectors are connected together in different ways.
Intersection selector
writing:
◆ Label + class/ID selector {property: value;}

1 div.logo{
2         background-color:pink;
3     }
4 
5 
6 div#miss{
7         text-indent:2em;
8     }


Features:
◆ To satisfy the use of a certain label, but also to satisfy the use of the class/ID selector

1  < div class ="logo" > intersection selector </ div > 

2 <div id="miss">property value</div>

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325097687&siteId=291194637