1. 程式人生 > >CSS3——兩欄佈局

CSS3——兩欄佈局

<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<style type="text/css">
			*{
				margin: 0;
				width: 0;
			}
			.demo1{
				height: 100px;
				width: 100px;
				background-color: #fcc;
				position: absolute;
				right: 0;
			}
			.demo2{
				height: 100px;
				margin-right: 100px;
				background-color: black;
			}
		</style>
		<title></title>
	</head>
	<body>
		<div class="demo1"></div>
		<div class="demo2"></div>
	</body>
</html>