登录页代码:
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>电商网站 - 登录</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<div class="content">
<h1>登录</h1>
<form action="./作业1.2.html" method="post">
<label for="username">用户名:</label><br>
<input type="text" id="username" name="username" required><br>
<label for="password">密码:</label><br>
<input type="password" id="password" name="password" required><br>
<br>
<input type="submit" value="登录">
</form>
</div>
</body>
</html>
运行截图:
商品页代码:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>商品展示页</title>
<style>
a{
display: block;
width: 194px;
height: 344px;
border-top: 1px solid #f2f2f2;
border-left: 1px solid #f2f2f2;
padding-top: 22px;
padding-left: 20px;
padding-right: 20px;
text-decoration: none;
}
ul li{
display: inline-block;
}
img{
width: 194px;
height: 198px;
}
.pro-introduce{
width: 194px;
height: 40px;
padding-top: 10px;
}
.pro-introduce>span{
font-size: 14px;
color: #9b9b9b;
line-height: 20px;
}
.pro-price{
height: 25px;
padding-top: 6px;
line-height: 1.6;
font-size: 18px;
color: red;
}
.pro-boss{
width: 194px;
height: 17.8px;
font-size: 12px;
color: #9b9b9b;
line-height: 17px;
}
</style>
</head>
<body>
<div class="container">
<ul>
<li>
<a href="./作业1.3.html">
<img src="https://gw.alicdn.com/imgextra/i2/2037040441/O1CN01yqOrIO1F81Uo5zmGm_!!2037040441.jpg_Q75.jpg_.webp" alt="">
<div class="pro-introduce">
<span>礼物24期免息BURBERRY 女装 切尔西中长款 Trench 风衣</span>
</div>
<div class="pro-price">
<span>¥21500</span>
</div>
<div class="pro-boss">
<span>博柏利官方旗舰店</span>
</div>
</a>
</li>
<li>
<a href="./作业1.3.html">
<img src="https://gw.alicdn.com/imgextra/i2/2037040441/O1CN01yqOrIO1F81Uo5zmGm_!!2037040441.jpg_Q75.jpg_.webp" alt="">
<div class="pro-introduce">
<span>礼物24期免息BURBERRY 女装 切尔西中长款 Trench 风衣</span>
</div>
<div class="pro-price">
<span>¥21500</span>
</div>
<div class="pro-boss">
<span>博柏利官方旗舰店</span>
</div>
</a>
</li>
</ul>
</div>
</body>
</html>
运行截图:
商品页代码:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
*{
margin:0px ;
}
a{
text-decoration: none;
color: gray;
}
li,span{
list-style: none;
display: inline-block;
color: gray;
}
.boxB1{
width: 100%;
height: 70px;
}
.st{
width: 15px;
height: 15px;
background-image: url(https://img0.baidu.com/it/u=2802467134,2008148961&fm=253&fmt=auto&app=138&f=JPG?w=300&h=300);
background-size: 89%;
background-position: center;
float: left;
}
.boxB2Img{
width:30%;
height: 300px;
margin-left: 50px;
margin-top: 10px;
float: left;
}
.boxB2W{
width: 30%;
height: 600px;
margin: auto;
margin-top: 30px;
}
.money{
width: 200px;
height: 30px;
margin: 10px 10px 10px 10px;
}
.money > span{
color: chocolate;
font-size: 30px;
}
.cc{
width: 600px;
height: 200px;
}
.boxB1img1{
width: 50px;
height: 40px;
}
.cc1{
width: 170px;
height: 50px;
background-color: rgb(211, 81, 21);
border-top-left-radius: 5px;
border-bottom-left-radius: 5px;
display: inline-block;
text-align: center;
}
.cc2{
width: 170px;
height: 50px;
background-color: orange;
border-top-right-radius: 5px;
border-bottom-right-radius: 5px;
display:inline-block;
margin-left: -10px;
text-align: center;
}
.cc span{
font-size: 20px;
font-weight: 1000;
color: white;
}
</style>
</head>
<body>
<div class="boxMax">
<div class="boxB1">
<div>
<div class="boxB1img1"></div>
<span class="boxB1span">博柏利官方旗舰店</span>
<a href=""></a>
</div>
</div>
<div>
<table>
<tr>
<div width="100px" height="20px" style="background-color: rgb(255, 238, 230);">
<td>5.0</td>
<td><div class="st"></div></td>
<td><div class="st"></div></td>
<td><div class="st"></div></td>
<td><div class="st"></div></td>
<td><div class="st"></div></td>
</div>
<td width="15px"></td>
<td>
<span>平均13小时发货</span>
</td>
<td width="15px"></td>
<td>
<span>客服平均10秒回复</span>
</td>
<td width="15px"></td>
<td>
<span>物流体验良好</span>
</td>
</tr>
</table>
</div>
<div>
<a href=""></a>
</div>
<div>
<a href=""></a>
</div>
</div>
<div class="boxB2">
<div class="boxB2Img"><img src="https://gw.alicdn.com/imgextra/i2/2037040441/O1CN01yqOrIO1F81Uo5zmGm_!!2037040441.jpg_Q75.jpg_.webp" alt="" width="350px"></div>
<div class="boxB2W">
<h1>礼物24期免息BURBERRY 女装 切尔西中长款 Trench 风衣</h1>
<table>
<tr>
<div class="money">
<span>
¥21500
</span>
<a href=""></a>
</div>
</tr>
<tr>
<div class="cc">
<div class="cc1"><span>立即购买</span></div>
<div class="cc2"><span>加入购物车</span></div>
</div>
</tr>
</table>
</div>
</div>
</div>
</body>
</html>
运行截图: