让div左右对齐自适应高度的网页特效(常看)

让div左右对齐自适应高度的网页特效(常看)_第1张图片


原文:http://www.360doc.com/content/13/0723/09/8445249_301885130.shtml

<!DOCTYPE HTML >
<html>

	<head>
		<meta charset="utf-8">
	
		<style type="text/css">
			.box { border:1px solid #006699; width:500px; overflow: hidden; }
			.box .left { float:left; width:30%; background:red; padding-bottom:3000px; margin-bottom:-3000px; }
			.box .right { float:right; width:70%; background:green; padding-bottom:3000px; margin-bottom:-3000px; }
		</style>
	</head>

	<body>
		
		<div class="box">
			<div class="left">
				 <h1>wo</h1> <h1>wo</h1> <h1>wo</h1>
			</div>
			<div class="right">
				 <h1>wo</h1>
			</div>
		</div>
	</body>

</html>


你可能感兴趣的:(让div左右对齐自适应高度的网页特效(常看))