Blogger Information
Blog 32
fans 0
comment 0
visits 23734
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
css中选择器的优先级-2019年4月24日8点30分
小李广花荣
Original
621 people have browsed it
  1. 下面我将运用CSS常见的选择器来展示

实例

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>css中选择器优先级</title>
    <style>
        div{
            width: 200px;
            height: 200px;
            color: #000;
        }
        .a1{
            color: #00CC66;
        }
        #a2{
            color: red;
        }
    </style>
</head>
<body>
<div class="a1" id="a2" >CSS中选择器的优先级</div>

</body>
</html>

运行实例 »

点击 "运行实例" 按钮查看在线实例

下面是运行后视图:

QQ图片20190425194121.png

上方运用了三种常用的选择器 标签 class id

3.综上诉述本节课我学到了选择的常用方法

  标签内联样式>id>class>标签

Correction status:Uncorrected

Teacher's comments:
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!