左边定宽右边自适应布局

<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
		<style type="text/css">
			* {
				padding: 0px;
				margin: 0px;
			}
			
			html,
			body {
				 100%;
				height: 300px;
			}
			
			.main {
				box-sizing: border-box;
				padding: 0 10px;
				 100%;
				height: 300px;
				position: relative;
			}
			
			.main0 {
				 100px;
				height: 300px;
				position: absolute;
				background: red;
			}
			
			.main1 {
				 100%;
				height: 300px;
				box-sizing: border-box;
				padding-left: 100px;
				background: green;
			}
		</style>
	</head>

	<body>
		<div class="main">
			<div class="main0">
                AAAAAAA
			</div>
			<div class="main1">
                BBBBBBBBB
			</div>
		</div>
	</body>

</html>

  

原文地址:https://www.cnblogs.com/libin-1/p/5751593.html