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;">换个<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>器?</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><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;"><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><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>器是用做什么的?</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">Html<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>的元素,每一个元素,你都<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>描述这个人是什么样子,有的高,有的矮,有男的,有女的,有人妖。</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>自己的身份证号?这个身份证号,在Html的属性里,就叫做ID。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">因此</span>,ID<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>任何问题吧?</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">然则</span>ID<span style="color: black;">选取</span>器有<span style="color: black;">欠好</span>,<span style="color: black;">便是</span>ID<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>,Name<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;">再</p>
</span></div>
你的话深深触动了我,仿佛说出了我心里的声音。
页:
[1]