2021.4.17笔记 div和table布局

div

<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title>div网页布局</title>
		<style type="text/css">
			body{
				margin: 0;
			}
			#container{
				width: 100%;
				height: 950px;
				background-color: aqua;
			}
			#content_header{
				width: 100%;
				height: 10%;
				background-color: blue;
			}
			#content_menu{
				width: 50%;
				height: 80%;
				background-color: bisque;
				float: left;
			}
			#content_list{
				width: 50%;
				height: 80%;
				background-color: cadetblue;
				float: left;
			}
			#content_footer{
				width: 100%;
				height: 10%;
				background-color: aquamarine;
				clear: both;
			}
		</style>
	</head>
	<body>
		<div id="container">
			<div id="content_header">我是头部</div>
			<div id="content_menu">我是左边</div>
			<div id="content_list">我是右边</div>
			<div id="content_footer">我是底部</div>
		</div>
	</body>
</html>

table

<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title>table网页布局</title>
	</head>
	<body marginheight="0px" marginwidth="0px">
		<table height="950px" width="100%">
			<tr>
				<td colspan="2" width="100%" height="10%" style="background-color: aqua;">我是头部</td>
			</tr>
			<tr>
				<td width="30%" height="80%" style="background-color: beige;">我是左边</td>
				<td width="70%" height="80%" style="background-color: pink;">我是右边</td>
			</tr>
			<tr>
				<td width="100%" height="10%" style="background-color: blue;" colspan="2">我是底部</td>
			</tr>
		</table>
	</body>
</html>
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值