HTML CSS 贵美商城网页布局
材料:链接: https://pan.baidu.com/s/13wK9ZvSAQ7lLkhYwFGUXdg 提取码:f5it
然后将素材放入img
![在这里插入图片描述](https://img-blog.csdnimg.cn/20190629100509661.png)
效果图
结果图
代码
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>欢迎来到 贵美商城</title>
<style>
#mid{
position: absolute;
left: 30px;
top: 150px;
}
#topline{
list-style: none;
position: absolute;
top: 0px;
left: 525px;
font-weight: 500;
}
#topline li{
display: inline; /*水平*/
margin: 10px; /*间距*/
}
#secondLine{
list-style: none; /*去除点*/
position: absolute;
top: 95px;
left: 0px;
}
#secondLine li{
display: inline; /*水平*/
margin: 10px;
text-align: center;
font-weight: 600;
}
#gwc{
position: absolute;
top: 17px;
left: 550px;
}
#bzzx{
position: absolute;
top: 18px;
left: 625px;
}
#jrsc{
position: absolute;
top: 18px;
left: 715px;
}
#swzy{
position: absolute;
top: 17px;
left: 805px;
}
#dl{
position: absolute;
top: 18px;
left: 892px;
}
#zc{
position: absolute;
top: 18px;
left: 950px;
}
#mxzq{
position: absolute;
top: 155px;
left: 243px;
}
#left{
list-style: none;
line-height: 147px; /*行高*/
position: absolute;
top: 114px;
left: 50px;
text-align: center;
color: orange;
font-weight: 900;
}
#jydq{
position: absolute;
top: 212px;
left: 39px;
}
#sj{
position: absolute;
top: 360px;
left: 39px;
}
#sjsm{
position: absolute;
top: 505px;
left: 39px;
}
#rybh{
position: absolute;
top: 660px;
left: 39px;
}
#fkqg{
position: absolute;
top: 420px;
left: 250px;
text-align: center;
font-size: small;
}
#fkqg img{
}
#fk1{
position: absolute;
top: 400px;
left: 300px;
}
#fk2{
position: absolute;
top: 400px;
left: 470px;
}
#fk3{
position: absolute;
top: 400px;
left: 640px;
}
#fk4{
position: absolute;
top: 510px;
left: 300px;
}
#fk5{
position: absolute;
top: 510px;
left: 470px;
}
#fk6{
position: absolute;
top: 510px;
left: 640px;
}
#fk7{
position: absolute;
top: 660px;
left: 300px;
}
#fk8{
position: absolute;
top: 660px;
left: 470px;
}
#fk9{
position: absolute;
top: 660px;
left: 640px;
}
#right{
position: absolute;
top: 300px;
left: 800px;
line-height: 60px;
list-style: none;
}
#r1{
position: absolute;
top: 335px;
left: 780px;
}
#r2{
position: absolute;
top: 395px;
left: 780px;
}
#r3{
position: absolute;
top: 455px;
left: 780px;
}
#r4{
position: absolute;
top: 515px;
left: 780px;
}
</style>
</head>
<body>
<div id="header">
<img src="img/h_bg.jpg" />
<ul id="topline">
<li>购物车</li>
<li>帮助中心</li>
<li>加入收藏</li>
<li>设为主页</li>
<li>登陆</li>
<li>注册</li>
</ul>
<ul id="secondLine">
<li> 首页 </li>
<li>家用电器</li>
<li>手机数码</li>
<li>日用百货</li>
<li> 书籍 </li>
<li>帮助中心</li>
<li>免费开店</li>
<li>全球资讯</li>
</ul>
<img id="gwc" src="img/xiazai3.png"/>
<img id="bzzx"src="img/bangzhuzhongxin.png"/>
<img id="jrsc"src="img/jiarushoucang.png" />
<img id="swzy"src="img/zhuye.png" />
<img id="dl" src="img/denglu.png"/>
<img id="zc" src="img/zhuce.png"/>
</div>
<div id="section">
<img src="img/bg.gif" id="mid"/>
<img id="mxzq" src="img/adv_2.jpg" />
<ul id="left">
<li>家用电器</li>
<li>书籍</li>
<li>手机数码</li>
<li>日用百货</li>
</ul>
<table id="jydq" width="190px" height="100px">
<tr>
<td>大家电</td>
<td>大家电</td>
<td>大家电</td>
</tr>
<tr>
<td>大家电</td>
<td>大家电</td>
<td>大家电</td>
</tr>
<tr>
<td>大家电</td>
<td>大家电</td>
<td>大家电</td>
</tr>
<tr>
<td>大家电</td>
<td>大家电</td>
<td>大家电</td>
</tr>
<tr>
<td>大家电</td>
<td>大家电</td>
<td>大家电</td>
</tr>
</table>
<table id="sj" width="190px" height="90px">
<tr>
<td>大家电</td>
<td>大家电</td>
<td>大家电</td>
</tr>
<tr>
<td>大家电</td>
<td>大家电</td>
<td>大家电</td>
</tr>
<tr>
<td>大家电</td>
<td>大家电</td>
<td>大家电</td>
</tr>
<tr>
<td>大家电</td>
<td>大家电</td>
<td>大家电</td>
</tr>
<tr>
<td>大家电</td>
<td>大家电</td>
<td>大家电</td>
</tr>
</table>
<table id="sjsm" width="190px" height="90px">
<tr>
<td>大家电</td>
<td>大家电</td>
<td>大家电</td>
</tr>
<tr>
<td>大家电</td>
<td>大家电</td>
<td>大家电</td>
</tr>
<tr>
<td>大家电</td>
<td>大家电</td>
<td>大家电</td>
</tr>
<tr>
<td>大家电</td>
<td>大家电</td>
<td>大家电</td>
</tr>
<tr>
<td>大家电</td>
<td>大家电</td>
<td>大家电</td>
</tr>
</table>
<table id="rybh" width="190px" height="100px">
<tr>
<td>大家电</td>
<td>大家电</td>
<td>大家电</td>
</tr>
<tr>
<td>大家电</td>
<td>大家电</td>
<td>大家电</td>
</tr>
<tr>
<td>大家电</td>
<td>大家电</td>
<td>大家电</td>
</tr>
<tr>
<td>大家电</td>
<td>大家电</td>
<td>大家电</td>
</tr>
<tr>
<td>大家电</td>
<td>大家电</td>
<td>大家电</td>
</tr>
</table>
<table id="fkqg" width="510px" height="420px">
<tr>
<td>惠普商务移动应用英寸笔记本</td>
<td>夏新N6 GPS真人语音导航手机 超低特价疯抢 数量有限!</td>
<td>三星家庭影院 HT-TZ325 购机送好礼(超值性价比)</td>
</tr>
<tr>
<td>明基MP512投影机 2899元 送100元京券 SVGA 2200流明</td>
<td>罗技数据1TB移动鼠标729元开抢了!</td>
<td>海森那尔极品耳机绝对不容错过</td>
</tr>
<tr>
<td>亚马逊随时阅读,随时记录,时尚最佳选择!</td>
<td>优雅相框</td>
<td>IBM 2009最新上网本,特色尽显</td>
</tr>
</table>
<img id="fk1"src="img/promote-1.jpg" border="1"/>
<img id="fk2"src="img/promote-2.jpg" border="1" />
<img id="fk3"src="img/promote-3.jpg" border="1" />
<img id="fk4"src="img/laser-pen.jpg" border="1" />
<img id="fk5"src="img/mouse.jpg" border="1" />
<img id="fk6"src="img/earphone.jpg" border="1" />
<img id="fk7"src="img/notebook.jpg" border="1" />
<img id="fk8"src="img/Frame.jpg" border="1" />
<img id="fk9"src="img/Wancom.jpg" border="1" />
<ul id="right">
<li>大牌狂降价,三折直送</li>
<li>大学要求老师开网店</li>
<li>黑眼圈推荐,美白不停</li>
<li>瘦身狂潮,修形之选</li>
</ul>
<img id="r1"src="img/show1.jpg" border="1"/>
<img id="r2"src="img/show2.jpg" border="1"/>
<img id="r3"src="img/show5.jpg" border="1"/>
<img id="r4"src="img/show4.jpg" border="1"/>
</div>
</body>
</html>