制作淘宝界面的简易框架

(练习)淘宝页面的基本框架

根据浮动,定位知识,做一个小练习,制作一个简易的淘宝页面框架.

其代码如下

<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<style type="text/css">
			.tb1{
				width: 250px;
				background-color: #6495ED;
				height: 500px;
				float: right;
			}
			.tb2{
				width: 250px;
				background-color: #6495ED;
				height: 500px;
				float:left;
			}
			#b2{
				width: 1248px;
				height:300px;
			}
			.tb3{
				width: 500px;
				height: 300px;
				background-color: #FF7F50;
				position: relative;
				left: 260px;
				bottom: 500px;
				margin: 0;
				}
		    .tb4{
				width: 200px;
				height: 300px;
				background-color: aquamarine;
				position: relative;
				left: 780px;
				bottom: 800px;
				margin: 0;
			}
			.tb5{
				width: 230px;
				height: 180px;
				background-color: cadetblue;
				position: relative;
				left: 260px;
				bottom: 780px;				
			}
			.tb6{
				width: 230px;
				height: 180px;
				background-color: #8A2BE2;
				position: relative;
				left: 500px;
				bottom: 960px;
			}
			.tb7{
				width: 230px;
				height: 180px;
				background-color: #8A2BE2;
				position: relative;
				left: 740px;
				bottom: 1140px;
			}
		</style>
	</head>
	<body>
			<div id="b2">
				<div class="tb1">右</div>
				<div class="tb2">左</div>
				<div style="clear:both;"></div>
				<div class="tb3">中间左上</div>
				<div class="tb4">中间右上</div>
				<div class="tb5">中间左下</div>
				<div class="tb6">中间下方</div>
				<div class="tb7">中间右下</div>
			</div>
		</div>
	</body>
</html>

运行结果
在这里插入图片描述

  • 11
    点赞
  • 31
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值