话不多说直接上效果图吧
商城网页 导航栏部分是有下划线滑动效果的
本网页的核心就在于此
代码都放在下面了
好了直接进入到我们的代码部分
第一个网页的html部分
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>京东商城</title>
<link rel="stylesheet" href="Demo.css ">
</head>
<body>
<!-- 第一个黑色部分 -->
<div id="one">
<span id="oneTop" onclick="javascript:location.href='注册页面'"><img src="../images/user.png" id="imgOne"/>注册</span>
</div>
<!-- 对于导航栏部分的设置 -->
<div id="tow">
<img src="../images/logo.png" id="imgTow"/>
<span id="distance"> </span>
<ul id="padd">
<li><a href="https://www.vmall.com/?cid=10074" >个人及家庭产品</a></li>
<li><a href="https://www.vmall.com/?cid=10074" >商用产品及方案</a></li>
<li><a href="https://www.vmall.com/?cid=10074">服务支持</a></li>
<li><a href="https://www.vmall.com/?cid=10074">合作伙伴与开发者</a></li>
<li><a href="https://www.vmall.com/?cid=10074">关于华为</a></li>
</ul>
<span id="shopping">
<a href="https://www.vmall.com/?cid=10074" target="_blank">
<img src="../images/cart.png" id="imgThree"/>在线购买
</a></span>
</div>
<!-- 第一张大图 -->
<div>
<a href="https://www.vmall.com/?cid=10074" target="_blank">
<img src="../images/banner-top.jpg" id="imgFour"/></a>
</div>
<!-- 中间的一段空白间距标签 -->
<div id="four" height="168px">推荐信息 </div>
<br /><br /><br /><br /><br />
<div id="six">
<span>
<a href="https://www.vmall.com/?cid=10074" target="_blank">
<img src="../images/list1.jpg" id="sixOne"> </a>
<img src="../images/list2.jpg" id="sixTow"/>
</span>
</div>
<img src="../images/list3.jpg" id="sixThree">
<img src="../images/list4.jpg" id="sixFour">
<div id="seven">
<a href="https://www.vmall.com/?cid=10074" target="_blank">
<img src="../images/banner-bottom.jpg" id="sevenSeven" width="100%">
</a>
<div id="last">
<a href="https://www.vmall.com/?cid=10074" target="_blank"> <span>华为商城</span></a>
<a href="https://www.vmall.com/?cid=10074" target="_blank"> <span>华为云</span></a>
<a href="https://www.vmall.com/?cid=10074" target="_blank"> <span>华为智能光伏</span></a>
<a href="https://www.vmall.com/?cid=10074" target="_blank"> <span>产品定义社区</span></a>
<a href="https://www.vmall.com/?cid=10074" target="_blank"> <span>华为心声社区</span></a>
<a href="https://www.vmall.com/?cid=10074" target="_blank"> <span>联系我们</span></a>
<a href="https://www.vmall.com/?cid=10074" target="_blank"> <span>法律声明</span></a>
<a href="https://www.vmall.com/?cid=10074" target="_blank"> <span>隐私保护</span></a>
</div>
<img src="../images/help.jpg" id="float">
</div>
</body>
</html>
第一个网页的css代码部分
/* 对于顶头黑色背景的装饰 */
#one{
background-color:black;
height: 28px;
width: 100%;
}
/* 对于a标签 账户二字的装饰设置 */
#oneTop{
font-size: 12px;
color: #ccc;
position: absolute;
right: 50px;
line-height: 28px;
text-decoration-color:#fff ;
}
/* 对于 账户二字旁a标签的颜色设置 */
#A1{
color: #fff;
}
/* 微调user用户图标的位置使其美观 */
#imgOne{
position: relative;
top: 5px;
}
/* 设置tow部分的背景颜色以及高度 */
#tow{
background-color: #FFFFFF;
height: 85px;
line-height: 3px;
}
/* 调整logo图片的位置以及宽度 */
#imgTow{
width: 150px;
position: relative;
left: 60px;
}
/* 对于a标签A2的设置 */
#A2{
text-decoration: none;
color: #000000;
}
/* 对于购物文字标签的设置 */
#shopping{
position: absolute;
right: 20px;
top: 70px;
}
/* 对于购物图标的微调 */
#imgThree{
position: relative;
top: 5px;
width: 20px;
height: 20px;
}
/* 对于导航栏下划线动画装饰的设置 */
ul,li{
display:inline-block;
}
a,a:link{
color:#000;
text-decoration:none;
position:relative;
padding:10px 15px;
}
a:after{
content: "";
width: 0;
height: 3px;
background: #c7000b;
position: absolute;
bottom: 0;
left: 50%;
transition: all .2s;
}
a:hover:after,a.active:after{
left: 0%;
width: 100%;
}
/* 微调间距 与字体的设置 */
#padd li{
padding: 30px;
}
/* 对于第一张大图片的设置 */
#imgFour{
width: 100%;
height: 400px;
}
/* 对于中间的一段间隔的标签的设置 */
#four{
width: 168px;
height: 100%;
margin: auto;
font-size: 28px;
position: relative;
top: 65px;
}
/* 对于中间一段间隔的标签的文字的设置 */
#four_word{
font-size: 28px;
font-style: inherit;
color: #333;
}
/* 对于第二个插图部分的大小设置 */
#sixOne{
height: 330px;
width: 60%;
}
#sixTow{
height: 330px;
width: 37%;
position: absolute;
right: 40px;
}
#sixThree{
width: 25%;
height: 330px;
}
#sixFour{
width: 72%;
height: 330px;
}
#sevenSeven{
width: 100%;
height: 400px;
}
#last span{
padding: 10px;
color: #666;
font-size: 14px;
}
/* 对于第7部分的设置 */
#7{
position: absolute;
top: 0px;
}
#seven{
position: relative;
top: 80px;
}
/* 对于底部的设置 */
#last{
height: 50px;
text-align: center;
background-color: #f2f2f2;
line-height: 50px;
}
/* 对于浮动图标的设置 */
#float{
width: 40px;
height: 40px;
position: fixed;
bottom: 50px;
right: 0px;
}
第一个网页的所有代码都在上面了, 欢迎提出宝贵的修改意见或与我交流学习
如需图片材料 请在下方留言
接下来第二个网页代码
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>注册页面</title>
<style type="text/css">
/* 对于顶部的设置 */
#Top{
width: 100%;
height: 40px;
}
#TopOne{
width:100%;
height: 70px;
}
/* 对于第一段文字的设置 */
#word{
position: relative;
left: 165px;
top: 50px;
color: #666;
}
/* 对于大表格部分的样式设计 */
#tow{
border: 1px solid #BDBDBD;
width: 80%;
margin: auto;
}
/* 对于输入框的设置 */
.input{
width: 350px;
height: 30px;
}
/* 对于文字的设置 */
.word{
font-size: 14px;
color: #000000;
}
/* 对于*样式的设计 */
.word1
{
font-size: 16px;
color: #F30;
}
/* 对于下拉列表的设置 */
.option{
width: 355px;
height: 30px;
}
/* 对于多选框的设置 */
#chek{
position: relative;
left: 150px;
}
/* 对于多选框文字的设置 */
#word2{
font-size: 14px;
color: #666666;
}
/* 对于注册按钮的设置 */
#button{
width: 101px;
height: 30px;
}
/* 对于最后灰色框的设置 */
#last{
background-color: #efefef;
font-size: 12px;
color: #666666;
height: 40px;
width: 100%;
position: absolute;
bottom: 100px;
line-height: 40px;
text-align: center;
left: 60px;
}
</style>
</head>
<body>
<!-- 顶部部分 -->
<div id="Top">
<img src="../images/Top.png" id="TopOne"/>
</div>
<h1 id="word"> 注册新的账号</h1>
<br /><br />
<!-- 大表格部分 -->
<div id="tow">
<table align="center" cellpadding="0px" cellspacing="10px">
<br /><br /><br />
<tr >
<td class="word">账号</td>
<td><input type="text" class="input" placeholder="请输入账号"></td>
<td class="word1">*</td>
</tr>
<tr >
<td class="word">电子邮箱</td>
<td><input type="text" class="input" placeholder="请输入电子邮箱"></td>
<td class="word1">*</td>
</tr>
<tr >
<td class="word">密码</td>
<td><input type="password" class="input" placeholder="请输入密码"></td>
<td class="word1">*</td>
</tr>
<tr>
<td>国家/地区</td>
<td>
<select class="option">
<option value="0" class="option">---中国大陆---</option>
<option value="1" class="option">---中国台湾---</option>
<option value="2" class="option">---中国香港---</option>
<option value="3" class="option">---中国澳门---</option>
<option value="4" class="option">---外国用户---</option>
</select>
</td>
<td class="word1">*</td>
</tr>
<tr>
<td> </td>
<td id="word2"> <input type="checkbox" >我已阅读并同意华为公司的用户注册协议和隐私声明</td>
</tr>
<tr> </tr>
<tr> </tr>
<tr>
<td> </td>
<td align="center"><input type="button" value="注册" id="button"></td>
</tr>
<tr>
<td> </td>
<td > </td>
</tr>
<tr>
<td> </td>
<td > </td>
</tr>
<tr>
<td> </td>
<td > </td>
</tr>
<tr>
<td> </td>
<td > </td>
</tr>
<tr>
<td> </td>
<td > </td>
</tr>
<span id="last">
Uniportal是华为公司对外提供身份认证的唯一入口,在使用华为公司的其他对外服务时,您的Uniportal帐号和登录信息会被共享。
</span>
</table>
</div>
</body>
</html>
如代码写的太粗糙 希望大家对我指正改进