<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title>基本选择器</title>
        <style>
        /*
             注意选择器的区别 元素直接用,类是.然后id是#
         */
        div{
                font-size: 26px;
                color: pink;
            }
        .div2{
                font-size: 30px;
                color: gold;
            }
            #div5{
                font-size: 30px;
                color: blue;
            }
        </style>
    </head>
    <body>
        <div>css的基本选择器,元素选择器</div>
        <div class="div2">css的基本选择器,类选择器</div>
        <div id="div5">css的基本选择器,id选择器</div>
    </body>
</html>

这个是效果

html的css选择器

 

相关文章:

  • 2021-11-17
  • 2021-08-08
  • 2021-06-25
  • 2022-01-06
  • 2021-05-11
  • 2022-01-23
  • 2021-09-01
  • 2021-11-11
猜你喜欢
  • 2022-01-18
  • 2021-05-31
  • 2022-02-08
  • 2022-02-08
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案