css 选取器类型有哪几种?
<div style="color: black; text-align: left; margin-bottom: 10px;"><span style="color: black;">
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">CSS是对样式的修饰,权重<span style="color: black;">表率</span>着某种级别,权重决定了你css规则<span style="color: black;">怎么样</span>被浏览器解析直到生效,css权重关系到你的css规则是<span style="color: black;">怎么样</span><span style="color: black;">表示</span>的。<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>:CSS<span style="color: black;">选取</span>器<span style="color: black;">便是</span><span style="color: black;">按照</span><span style="color: black;">区别</span>需求把<span style="color: black;">区别</span>的标签选出来,设置相应的样式</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">案例</p>
<div style="color: black; text-align: left; margin-bottom: 10px;">h1{
color:blue;
font-size:15px;
}</div>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">以上h1标签<span style="color: black;">选取</span>器,做了两件事:</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">1.找到所有的h1标签(<span style="color: black;">选取</span>对象)</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">2.设置这些标签的样式:字体颜色为蓝色,字体<span style="color: black;">体积</span>为15px(设置样式)</p>
<div style="color: black; text-align: left; margin-bottom: 10px;">
<div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://pica.zhimg.com/v2-684d6328cc529b68b193754653727eb9_l.jpg?source=f2fdee93" style="width: 50%; margin-bottom: 20px;">
<div style="color: black; text-align: left; margin-bottom: 10px;">
<div style="color: black; text-align: left; margin-bottom: 10px;">diveng</div>
<div style="color: black; text-align: left; margin-bottom: 10px;"><span style="color: black;">2 次咨询</span>
<div style="color: black; text-align: left; margin-bottom: 10px;"><span style="color: black;">5.0</span></div>
</div>
<div style="color: black; text-align: left; margin-bottom: 10px;">南通大学 工学硕士</div>
<div style="color: black; text-align: left; margin-bottom: 10px;">11266 次赞同</div>
</div>
<div style="color: black; text-align: left; margin-bottom: 10px;">去咨询</div>
</div>
</div>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">CSS<span style="color: black;">选取</span>器<span style="color: black;">功效</span>:CSS<span style="color: black;">便是</span>为了给HTML页面添加样式,CSS设置样式是<span style="color: black;">经过</span>CSS<span style="color: black;">选取</span>器进行<span style="color: black;">掌控</span>,CSS<span style="color: black;">选取</span>器<span style="color: black;">便是</span>用于指向<span style="color: black;">必须</span>CSS<span style="color: black;">功效</span>的标签,让CSS样式<span style="color: black;">晓得</span>自己<span style="color: black;">必须</span><span style="color: black;">功效</span>到哪个标签上去。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">CSS的<span style="color: black;">选取</span>器分为两大类:基本<span style="color: black;">选取</span>器和扩展(高级)<span style="color: black;">选取</span>器。</p>
<h2 style="color: black; text-align: left; margin-bottom: 10px;">基本<span style="color: black;">选取</span>器</h2>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">标签<span style="color: black;">选取</span>器:针对一类标签</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">ID<span style="color: black;">选取</span>器:针对某一个特定的标签<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>器:针对你想要的所有标签<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>器(通配符):针对所有的标签都适用(不<span style="color: black;">意见</span><span style="color: black;">运用</span>)</p>
<h2 style="color: black; text-align: left; margin-bottom: 10px;">高级<span style="color: black;">选取</span>器</h2>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">后代<span style="color: black;">选取</span>器:用空格</p>
</span></div>
我深感你的理解与共鸣,愿对话长流。 软文发布论坛开幕式圆满成功。 http://www.fok120.com 你的言辞如同繁星闪烁,点亮了我心中的夜空。 你的见解真是独到,让我受益匪浅。
页:
[1]