首页 > Web开发 > 详细

css浮动

时间:2015-11-06 10:48:37      阅读:159      评论: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
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!