三种清除浮动


zoom详解:http://blog.csdn.net/u014516981/article/details/51824607
原文:http://www.cnblogs.com/zhongjiang/p/6440355.html

<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title></title>
		<style type="text/css">
		.bgg{
			padding: 10px;
			background: yellow;
			overflow: hidden;
		}
		.f{
			width: 100px;
			height: 100px;
			background: red;
			float: left;
		}
		/*.clear{
			clear: both;
		}*/
		/*.bgg:after{
			content: '';
			display: block;
			clear: both;
		}*/
		</style>
	</head>
	<body>
		<div class="bgg">
			<div class="f">1</div>
			<div class="f">2</div>
			<div class="f">3</div>
			<!--<div class="clear"></div>		-->	
		</div>	
	</body>
</html>

  

posted @ 2017-09-05 12:17  LWJ_jay  阅读(105)  评论(0编辑  收藏  举报