博主信息
博文 21
粉丝 0
评论 0
访问量 15559
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
3月21日作业
许增颜
原创
822人浏览过

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举报处理!
全部评论 文明上网理性发言,请遵守新闻评论服务协议
0条评论
作者最新博文
关于我们 免责申明 意见反馈 讲师合作 广告合作 最新更新 English
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送
PHP中文网APP
随时随地碎片化学习
PHP中文网抖音号
发现有趣的

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号

  • 登录PHP中文网,和优秀的人一起学习!
    全站2000+教程免费学