web前端布局小练习

参考于 https://blog.csdn.net/liushaozhuanyong/article/details/57407175

以下为自己写的代码(与原著者有所不同,或许是黑科技吧):

<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
		<style type="text/css">
			* {
				margin: 0;
				padding: 0;
			}
			/*居中
			 * margin: 0 auto;*/
			#all {
				width: 970px;
				height: 593px;
				margin: 0 auto;
			}
			
			#top-left {
				width: 277px;
				height: 103px;
				background-color: red;
			}
			
			#top-right {
				margin-top: -103px;
				width: 679px;
				height: 103px;
				float: right;
			}
			
			#top-right1 {
				margin-left: 542px;
				width: 137px;
				height: 49px;
				background-color: green;
			}
			
			#top-right2 {
				margin-top: 8px;
				width: 679px;
				height: 46px;
				background-color: green;
			}
			
			#center {
				margin-top: 10px;
			}
			
			#center-left {
				float: left;
				width: 310px;
				height: 435px;
				background-color: yellow;
			}
			
			#lanse1 {
				float: left;
				width: 450px;
				height: 240px;
				background-color: skyblue;
				margin-left: 10px;
			}
			
			#lanse2 {
				float: left;
				width: 450px;
				height: 110px;
				background-color: skyblue;
				margin-top: 10px;
				margin-left: 10px;
			}
			
			#lanse3 {
				float: left;
				width: 450px;
				height: 30px;
				background-color: skyblue;
				margin-top: 10px;
				margin-left: 10px;
			}
			
			#zise {
				float: left;
				width: 190px;
				height: 400px;
				background-color: purple;
				margin-top: -360px;
				margin-left: 10px;
			}
			
			#lvse {
				width: 650px;
				height: 25px;
				background-color: green;
				float: left;
				margin-left: 10px;
				margin-top: 10px;
			}
			
			#bottom {
				width: 975px;
				height: 35px;
				background-color: #0000FF;
				margin-top: 10px;
				float: left;
			}
		</style>
	</head>

	<body>
		<div id="all">
			<div id="top">
				<div id="top-left"></div>
				<div id="top-right">
					<div id="top-right1"></div>
					<div id="top-right2"></div>
				</div>
			</div>

			<div id="center">
				<div id="center-left"></div>
				<div id="center-right">
					<div id="lanse">
						<div id="lanse1"></div>
						<div id="lanse2"></div>
						<div id="lanse3"></div>
					</div>
					<div id="zise"></div>
					<div id="lvse"></div>
				</div>
			</div>

			<div id="bottom"></div>
		</div>

	</body>

</html>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值