批改状态:未批改
老师批语:
3月21日
代码:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<style>
div ul{
border: 1px solid yellow;
}
li~li{
background-color: blue;
}
#onecolor+li{
background-color: goldenrod;
}
#twocolor>li{
color: aqua;
}
ul li:first-child{
background: red;
}
ul li:last-child{
background: green;
}
p:nth-child(1){
background: yellow;
}
P:nth-child(2){
background: blue;
}
}
a[href]{
color: yellow;
}
a[href="#"]{
color: red;
}
a[href^="http"]{
text-decoration: none;
}
a[href$="com"]{
color: chocolate;
}
a[href*="baidu"]{
color: darkmagenta;
}
</style>
</head>
<body>
<div>
<ul>
<li id="onecolor">A</li>
<li>B</li>
<li>C</li>
<li>D</li>
<p>E</p >
</ul>
<ul id="twocolor">
<li >A</li>/.
<li>B</li>
<li>C</li>
<li>D</li>
</ul>
<ul>
<li>li1</li>
<li>li2</li>
<li>li3</li>
</ul>
</div>
<a href=" ">超链接1</ a>
<a href="http://www.sogou.com">超链接2</ a>
<a href="http://www.baidu.com">超链接3</ a>
<a href=".com">超链接4</ a>
</body>
</html>点击 "运行实例" 按钮查看在线实例
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号