返回CSS浮动案例......登陆

CSS浮动案例练习

gh792019-03-15 17:44:471229
<!DOCTYPE html>
<html>
<head>
	<title>CSS中的浮动</title>
	<meta charset="utf-8">
	<style type="text/css">
		*{margin: 0px;padding: 0px;}
		ul li{
			list-style: none;
			width: 100px;
			height: 40px;
			line-height: 40px;
			text-align: center;
			background-color: #ccc;
			margin: 0px 1px;
			float: left;
		}
		.box{
			width: 200px;
			height: 200px;
			background-color: pink;
			float: left;
		}
		.clear{clear:both;}	
	</style>
</head>
<body>
	<ul>
		<li>html</li>
		<li>css</li>
		<li>javascript</li>
		<li>php</li>
	</ul>
	<div class="clear"></div>
	<div class="box">div1</div>
	<div class="box">div2</div>
	<div class="box">div3</div>
</body>
</html>


最新手记推荐

• 用composer安装thinkphp框架的步骤• 省市区接口说明• 用thinkphp,后台新增栏目• 管理员添加编辑删除• 管理员添加编辑删除

全部回复(0)我要回复

暂无评论~
  • 取消回复发送