css选取器归类
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">1,基本<span style="color: black;">选取</span>器</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">1.1,通用<span style="color: black;">选取</span>器</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"> *{属性:值;}—>*{margin 0px;}</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">1.2,标签<span style="color: black;">选取</span>器</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">标签名{属性:值;}—>p{font-size:14px}</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">1.3,类<span style="color: black;">选取</span>器</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"> .class属性值{属性:值;}—>.box{width:800px;}</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">1.4,id<span style="color: black;">选取</span>器</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">#id属性值(属性:值;)—>#title{font-size:14px;}</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">2,复合元素<span style="color: black;">选取</span>器</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">2.1,多元素<span style="color: black;">选取</span>器</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"> <span style="color: black;">选取</span>器1,<span style="color: black;">选取</span>器2{属性:值;}—>p,h1,h2{margin 0px;}</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">2.2,后代元素<span style="color: black;">选取</span>器</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">E F{属性:值;}—>#slidebar p {font-color:#990000;}</p>2.3,子元素<span style="color: black;">选取</span>器
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">E>F{属性:值;}—>div>p{color:#990000;}</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">2.4,相邻元素<span style="color: black;">选取</span>器</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">E+F{属性:值;}—>div+div{color:#993,伪类<span style="color: black;">选取</span>器</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"> :link :visited :hover :active</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">4,属性<span style="color: black;">选取</span>器</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">1)匹配所有<span style="color: black;">拥有</span>attr属性的元素,不<span style="color: black;">思虑</span>它的值</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">2)匹配所有attr属性值等于val的元素</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">3)匹配元素中attr属性以指定值开头的所有元素</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">4)匹配元素中attr属性以指定值结尾的所有元素</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">5)匹配元素中attr属性中<span style="color: black;">包括</span>指定值的所有元素</p>
<div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://pic3.zhimg.com/80/v2-e2eb99ac37dff0f96af80acb4da1b6a2_720w.webp" style="width: 50%; margin-bottom: 20px;"></div>
这夸赞甜到心里,让我感觉温暖无比。 你字句如珍珠,我珍藏这份情。
页:
[1]