使用HTML与CSS制作一个简易的华为商城页面和注册页面

话不多说直接上效果图吧

商城网页 导航栏部分是有下划线滑动效果的
本网页的核心就在于此
代码都放在下面了
网页在这里插入图片描述
在这里插入图片描述

好了直接进入到我们的代码部分
第一个网页的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"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</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>&nbsp;</td>
			<td id="word2"> <input type="checkbox" >我已阅读并同意华为公司的用户注册协议和隐私声明</td>
		</tr>
		<tr>&nbsp;</tr>
		<tr>&nbsp;</tr>
		
		<tr>
			<td>&nbsp;</td>
			<td align="center"><input type="button" value="注册" id="button"></td>
		</tr>
		
		<tr>
			<td>&nbsp;</td>
			<td >&nbsp</td>
		</tr>
		<tr>
			<td>&nbsp;</td>
			<td >&nbsp</td>
		</tr>
		<tr>
			<td>&nbsp;</td>
			<td >&nbsp</td>
		</tr>
		<tr>
			<td>&nbsp;</td>
			<td >&nbsp</td>
		</tr>
		<tr>
			<td>&nbsp;</td>
			<td >&nbsp</td>
		</tr>
		
		<span id="last">
	 Uniportal是华为公司对外提供身份认证的唯一入口,在使用华为公司的其他对外服务时,您的Uniportal帐号和登录信息会被共享。
		</span>
		
	</table>
			
			
			
		</div>
	</body>
</html>

如代码写的太粗糙 希望大家对我指正改进

  • 61
    点赞
  • 372
    收藏
    觉得还不错? 一键收藏
  • 11
    评论
好的,华为商城注册页面一个常见的表单页面,可以使用HTMLCSS来实现。您可以参考以下代码实现: HTML代码: ``` <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>华为商城注册页面</title> <link rel="stylesheet" href="styles.css"> </head> <body> <h2>欢迎来到华为商城,请注册成为我们的会员</h2> <form> <label for="username">用户名:</label> <input type="text" id="username" name="username" required> <label for="password">密码:</label> <input type="password" id="password" name="password" required> <label for="confirm-password">确认密码:</label> <input type="password" id="confirm-password" name="confirm_password" required> <label for="email">电子邮件:</label> <input type="email" id="email" name="email" required> <label for="phone-number">手机号码:</label> <input type="tel" id="phone-number" name="phone_number" required> <label for="address">地址:</label> <input type="text" id="address" name="address" required> <input type="submit" value="注册"> </form> </body> </html> ``` CSS代码: ``` body { font-family: Arial, sans-serif; margin: 0; padding: 0; background-color: #EFEFEF; } h2 { margin-top: 50px; text-align: center; } form { max-width: 500px; margin: 0 auto; background-color: white; padding: 20px; border-radius: 10px; box-shadow: 0 0 10px rgba(0,0,0,0.3); } label { display: block; margin-top: 20px; font-size: 18px; color: #333; } input { width: 100%; padding: 10px; font-size: 16px; border: 1px solid #ccc; border-radius: 5px; } input[type="submit"] { margin-top: 30px; background-color: #FFA500; color: white; font-size: 20px; border: none; border-radius: 5px; padding: 10px; cursor: pointer; } input[type="submit"]:hover { background-color: #FF8C00; } ``` 这段代码会生成一个简单的表单,包括用户名、密码、确认密码、电子邮件、手机号码和地址输入框,以及一个注册按钮。您可以在这个基础上进行样式的修改和添加。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 11
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值