Blogger Information
Blog 44
fans 3
comment 3
visits 33819
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
3月21日作业
唔良人
Original
773 people have browsed it

实例

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>选择器</title>
    <style>
        /*通配选择符*/
        * {padding: 0;margin: 0;}
        /*类型选择符*/
        ul,li {list-style: none;text-decoration: none;}
        /*类选择符*/
        .top {width: 200px;}
        .one {color: #00aaee;}
        /*ID选择符*/
        #two {color: #0000FF;}
        /*属性选择符*/
        li[class="Three"] {color: #00CC66;}
        /*子对象选择符*/
        li > h1 { font-size: 16px;}
        /*包含选择符*/
        li p {color: #6a179a;}
    </style>
</head>
<body>
    <div class="top">
        <ul>
            <li class="one">我是第一个li</li>
            <li id="two">我是第二个li</li>
            <li class="Three">我是第三个li</li>
            <li><h1>我是第四个li</h1></li>
            <li><p>我是第五个li</p></li>
            <li>我是第六个li</li>
        </ul>
    </div>

</body>
</html>

运行实例 »

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

1521689776443.jpg

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