码迷,mamicode.com
首页 > Web开发 > 详细

css浮动

时间:2015-11-06 10:50:38      阅读:139      评论:0      收藏:0      [点我收藏+]

标签:

 
 
<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<style type="text/css">
			#box{
				border: 1px solid black;
				width:500px;
				background-color: rgb(100,100,100);
				
			}
			.left{
				height: 200px;
				width: 200px;
				border: 1px solid blue;
				float: left;
			}
			.right{
				height: 200px;
				width: 200px;
				border: 1px solid red;
				float: right;
				
				
			}
			.clear{
				clear: both;
			}
			#box2{
				height: 200px;
				border: 1px solid yellow;
				background-color: rgba(100,100,100,0.5);
			}
		</style>
	</head>
	<body>
		<div id="box">
			<div class="left"></div>
			<div class="right"></div>
			<div class="clear"></div>
		</div>
		<div id="box2">
			
		</div>
	</body>
</html>

  

css浮动

标签:

原文地址:http://www.cnblogs.com/miceqq/p/4941721.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!