博客列表 >3.21 作业 css

3.21 作业 css

不问人生的博客
不问人生的博客原创
2018年03月25日 22:26:54572浏览

代码

<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>CSS 3.21作业</title>
	<style type="text/css">
		ul{
			padding: 0;
			margin: 0;
			height: 80px;
			border: 2px dashed #888;
			border-radius: 25px;
			color: white;
			text-align: center;
			display: table-cell;
 			
		}
		li{
			list-style-type: none;
			width: 50px;height: 50px;
			line-height: 50px;
			background-color: red;
			border-radius: 5px;
			margin: 10px;
			float: left;
		}
		#head{
			color: yellow;
			font-size: 1.2em;
		}
		.green {
            background-color: blue;
		}
		ul li {
			color: black;
		}
		ul * {
			background-color: lightgreen;
		}
		ul>li {
			border:2px dashed red;
		}
		.white  + li {
			color: red;
		}
		.white ~ li{
        color: red;
		}
		*[id] {
			background-color: red;
		}
		li[class="white"] {
			background-color: yellow;
		}
		li[class ~="green"] {
			border-top-right-radius: 40%;
		}
		li[class ^="gr"] {
			background-color: lightblue;
		}
		li[class $="e"] {
			border-top-left-radius: 50%;
		}
		li[class *="ee"] {
			border-bottom-left-radius: 40%;
		}
	</style>
	
</head>
<body>
	<ul>
		<li id="head">任</li>
		<li class="white">吾</li>
		<li class="green">逍</li>
		<li>遥</li>
		<li class="green">九</li>
		<li>天</li>
		<li class="white">之</li>
		<li class="blue">外</li>

	</ul>
</body>
</html>	

运行实例 »

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

效果图

TIM截图20180325212911.png

手写代码:

111.jpg

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