类选择器练习:Google 案例

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>选择器案例</title>
</head>
<style>
    span{/*这
        个叫标签选择器,把所有的span标签选出来,然后大小设置*/
        font-size: 150px;
    }
      .g{/*这叫类选择器*/
        color: skyblue;
    }
        
      .o{
        color: red;

    }
       .x{
          color: orange;
    
      }
        .l{
          color: green;
      }
 
</style>
<body>
    <span class="g">G</span>
    <span class="o">o</span>
    <span class="x">o</span>
    <span class="g">g</span>
    <span class="l">l</span>
    <span class="o">e</span>

</body>
</html>

效果图如下:

注意点:

标签选择器和类选择器的区别

猜你喜欢

转载自www.cnblogs.com/fhtax/p/11220380.html
今日推荐