Blogger Information
Blog 19
fans 0
comment 0
visits 10563
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
3.21作业
JcLi的博客
Original
528 people have browsed it

实例

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>彩虹球</title>
<style type="text/css">
ul {   
padding: 0;
margin: 0;
width: 450px;
border: 0px dashed #666;
padding: 10px 5px;
}
ul:after {  
content:'';  
display: block;  
clear:both;   
}
li { 
list-style: none; 
float: left;  
width: 40px;  
height: 40px; 
line-height: 40px; 
text-align: center; 
border-radius: 50%;
background: skyblue; 
margin-right: 5px; 
}
        #item1{
         background-color: red
        }
        .green{
         background-color: orangered
        }
        ul li{
         color: white
        }
        li[class="red"] {
         background-color: yellow
        }
        li[id="item2"] {
    background-color: mediumseagreen
}
        #item2 + li {
    background-color: aqua
}
        li[class ~= "black"] {
background-color: mediumblue;
}
li[class $= "e"] {
background-color: purple
}
</style>
</head>
<body>
<ul>
<li id="item1">1</li>
<li class="green">2</li>
<li class="red">3</li>
<li id="item2">4</li>
<li>5</li>
<li class="black">6</li>
<li class="blue">7</li>
</ul>
</body>
</html>

运行实例 »

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

228B288F83BD500994F8B27C0D567254.jpg549886BFEE4826ACFFEF9893C2EFFB61.jpg

Correction status:qualified

Teacher's comments:作业已检查! 博客发布作业中添加了线上运行代码的新功能! 群文中找到入群必读文件夹下的博客如何提交作业.gif图下载了解! 博客提交作业时请把状态切换到作业!不然程序检测不到提交!
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