博客列表 >3月21日作业

3月21日作业

许增颜
许增颜原创
2018年03月25日 23:45:17670浏览

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>

运行实例 »

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


声明:本文内容转载自脚本之家,由网友自发贡献,版权归原作者所有,如您发现涉嫌抄袭侵权,请联系admin@php.cn 核实处理。
全部评论
文明上网理性发言,请遵守新闻评论服务协议