HTML,CSS仿写类淘宝三个页面(作业练习)

页面一:

代码:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>热卖页面</title>
<style>
    .box{
        width: 80%;
         margin: auto; 
    }
    .prod{
        width: 234px;
        height: 366px;
        list-style: none;
        border: 1px solid #f2f2f2;
        display: inline-block;
        line-height: 1.6;
        margin-left: -5px;
        
    }
    .prod-href{
        text-decoration: none;
    }
    .prod:hover{
        border-color: red;
    }
 
    .prod-intoduce-span{
        color: #9b9b9b;
        font-size: 14px;
    }
    .prod-price{
        font-size: 19px;
        color: red;
    }
    .prod-boss{
        color: #9b9b9b;
        font-size: 12px;
    }
    .prod-sale{
        color: #9b9b9b;
        font-size: 12px;
        border-top: 1px solid #f2f2f2;
        text-align: right;
        padding-top: 10px;
    }

    .prod-test-box{
        width: 210px;
        height: 340px;
        margin: auto;
        margin-top: 15px;
    }

    .tou{
        display: inline-block;
       
        margin-left: 10%;
    }
    .top{
        display: inline-block;
        width: 90%;
        height: 10%;
    }
    .shousuo{
        
        width: 600px;
        height: 35px;
        border: 2px solid red;
        float: right;
        margin-right: 25%;
        margin-top: 2%;
    }

    .wenzi{
        background-color: rgb(235, 65, 18);
        width: 65px;
        height: 35px;
        margin-left: 100%;
        border: solid 1px red;
        
    }

    .ziti{
        color: #f9f8f8;
        margin: auto;
    }

    .box2{

width: 90%;
height: 45px;
background-color: rgb(253, 250, 250);
margin-left: 5%;
border-radius:8%;

}
.hang{

font-size: 25px;
color: rgb(61, 62, 62);


}
.hang:hover{
background-color: rgb(201, 29, 29);
}
</style>
</head>
<body>
<div class="box2">
    <table align="center">
        <tr>
            <td>
    <span class="hang">中国大陆 &nbsp;</span>
    <span class="hang">免费注册 &nbsp;
        <a href=""></a>
    </span>
    <span class="hang">手机逛淘宝 &nbsp;</span>
    <span class="hang">淘宝网首页 &nbsp;</span>
    <span class="hang">我的淘宝 &nbsp;</span>
    <span class="hang">购物车 &nbsp;</span>
    <span class="hang">收藏夹 &nbsp;</span>
    <span class="hang">商品分类 &nbsp;</span>
            </td>
        </tr>
    </table>
    
</div>
<div class="top">

<div class="tou">
    <img class="biao" width="300px" height="150px" src="https://img.alicdn.com/tfs/TB1R5fsgyDsXe8jSZR0XXXK6FXa-281-80.jpg" alt="">
    
</div>

<div class="shousuo" >
<div class="wenzi">
    <span class="ziti">搜索</span>
</div>
</div>

</div>
<div class="box">
    <ul class="prods">
        <!-- 编写一个商品链接 -->
         <li class="prod">
            <a class="prod-href" href="">
                <div class="prod-test-box">
                    <img class="prod-img" width="200px" height="200px" src="https://img.alicdn.com/imgextra/i1/111634048/O1CN01dRftY21fm2B5HgTSp_!!0-saturn_solar.jpg_360x360xzq75.jpg_.webp" alt="">
                    
                    <div class="prod-introduce">
                        <span class="prod-intoduce-span">天猫好利来冰山熔岩巧克力纯可可脂礼盒甜品糕点</span>
                    </div>
                    <div class="prod-price">¥59</div>
                    <div class="prod-boss">好利来官方旗舰店</div>
                    <div class="prod-sale">月销7000+</div>
                </div>
            </a>
         </li>
         <li class="prod">
            <a class="prod-href" href=>
                <div class="prod-test-box">
                    <img class="prod-img" width="200px" height="200px" src="https://img.alicdn.com/imgextra/i1/111634048/O1CN01dRftY21fm2B5HgTSp_!!0-saturn_solar.jpg_360x360xzq75.jpg_.webp" alt="">
                    
                    <div class="prod-introduce">
                        <span class="prod-intoduce-span">靖江猪肉脯小包零食品蜜汁干吃的肉铺休闲边角料网红年货...</span>
                    </div>
                    <div class="prod-price">¥69.9</div>
                    <div class="prod-boss">满满无限旗舰店</div>
                    <div class="prod-sale">月销66</div>
                </div>
            </a>
         </li>
         <li class="prod">
            <a class="prod-href" href="">
                <div class="prod-test-box">
                    <img class="prod-img" width="200px" height="200px" src="https://img.alicdn.com/imgextra/i1/30869979/O1CN018z8Xvj2NaRIXr5hp2_!!2-saturn_solar.png_360x360xzq75.jpg_.webp" alt="">
                    
                    <div class="prod-introduce">
                        <span class="prod-intoduce-span">根筋辣条素牛筋8090后怀旧零食麻辣小吃儿时童年...</span>
                    </div>
                    <div class="prod-price">¥12.98</div>
                    <div class="prod-boss">金金美食特麻辣零食</div>
                    <div class="prod-sale">月销7000+</div>
                </div>
            </a>
         </li>
         <li class="prod">
            <a class="prod-href" href="">
                <div class="prod-test-box">
                    <img class="prod-img" width="200px" height="200px" src="https://img.alicdn.com/imgextra/i4/2616970884/O1CN018zs1Z31IOv5lo1pQm_!!2616970884-0-alimamacc.jpg_360x360xzq75.jpg_.webp" alt="">
                    
                    <div class="prod-introduce">
                        <span class="prod-intoduce-span">蜡瓶糖可食用儿童正品网红零食腊瓶糖辣瓶糖蜡皮笔糖辣平...</span>
                    </div>
                    <div class="prod-price">¥55.5</div>
                    <div class="prod-boss">苏宁易购官方旗舰店</div>
                    <div class="prod-sale">月销500+</div>
                </div>
            </a>
         </li>
         <li class="prod">
            <a class="prod-href" href="">
                <div class="prod-test-box">
                    <img class="prod-img" width="200px" height="200px" src="https://img.alicdn.com/imgextra/i2/113712902/O1CN01QUhZFP1XJALm3Vxkb_!!0-saturn_solar.jpg_360x360xzq75.jpg_.webp" alt="">
                    
                    <div class="prod-introduce">
                        <span class="prod-intoduce-span">麻辣王子辣条30小包官方正品</span>
                    </div>
                    <div class="prod-price">¥6.9</div>
                    <div class="prod-boss">惠祥食品</div>
                    <div class="prod-sale">月销5000+</div>
                </div>
            </a>
         </li>
         <li class="prod">
            <a class="prod-href" href="">
                <div class="prod-test-box">
                    <img class="prod-img" width="200px" height="200px" src="https://img.alicdn.com/imgextra/i1/2470120118/O1CN01iMKCch1Ck5hitESO6_!!0-saturn_solar.jpg_360x360xzq75.jpg_.webp" alt="">
                    
                    <div class="prod-introduce">
                        <span class="prod-intoduce-span">滇二娃农科院云南特产麻辣土豆片贵州小吃薯片休闲小零食..</span>
                    </div>
                    <div class="prod-price">¥7.9</div>
                    <div class="prod-boss">科闲合早</div>
                    <div class="prod-sale">月销6000+</div>
                </div>
            </a>
         </li>
         <li class="prod">
            <a class="prod-href" href="">
                <div class="prod-test-box">
                    <img class="prod-img" width="200px" height="200px" src="https://img.alicdn.com/imgextra/i2/52523936/O1CN01FymFaz1ewjsD7Bye6_!!0-saturn_solar.jpg_360x360xzq75.jpg_.webp" alt="">
                    
                    <div class="prod-introduce">
                        <span class="prod-intoduce-span">天猫盐津铺子零食大礼包休闲食品小吃辣卤解馋小零食吃货..</span>
                    </div>
                    <div class="prod-price">¥39.9</div>
                    <div class="prod-boss">址津铺了合早旅I庄</div>
                    <div class="prod-sale">月销2000+</div>
                </div>
            </a>
         </li>
         <li class="prod">
            <a class="prod-href" href="https://img.alicdn.com/imgextra/i1/5525149018/O1CN012sM0b52GUIh1yuHNp_!!0-saturn_solar.jpg_360x360xzq75.jpg_.webp">
                <div class="prod-test-box">
                    <img class="prod-img" width="200px" height="200px" src="https://img.alicdn.com/imgextra/i1/5525149018/O1CN012sM0b52GUIh1yuHNp_!!0-saturn_solar.jpg_360x360xzq75.jpg_.webp" alt="">
                    
                    <div class="prod-introduce">
                        <span class="prod-intoduce-span">泰国风味芒果干500g/1000蜜饯果干果脯网红休闲零食一斤...</span>
                    </div>
                    <div class="prod-price">¥8.85</div>
                    <div class="prod-boss">工王结寺T厂店</div>
                    <div class="prod-sale">月销1000+</div>
                </div>
            </a>
         </li>
         <li class="prod">
            <a class="prod-href" href="">
                <div class="prod-test-box">
                    <img class="prod-img" width="200px" height="200px" src="https://img.alicdn.com/imgextra/i4/382090074/O1CN01ppQ01k1CPwHTXUqgI_!!0-saturn_solar.jpg_360x360xzq75.jpg_.webp" alt="">
                    
                    <div class="prod-introduce">
                        <span class="prod-intoduce-span">天猫王小卤无骨鸡爪72g酸辣柠檬脱骨去骨凤爪解馋小零食.…</span>
                    </div>
                    <div class="prod-price">¥199</div>
                    <div class="prod-boss">王小与有实店</div>
                    <div class="prod-sale">月销800+</div>
                </div>
            </a>
         </li>
         <li class="prod">
            <a class="prod-href" href="">
                <div class="prod-test-box">
                    <img class="prod-img" width="200px" height="200px" src="https://img.alicdn.com/imgextra/i1/31536383/O1CN015QUlaH1x1T2PD9nVa_!!0-saturn_solar.jpg_360x360xzq75.jpg_.webp" alt="">
                    
                    <div class="prod-introduce">
                        <span class="prod-intoduce-span">天猫三只松鼠辣卤礼包100包零食大礼包整箱卤味肉类夜宵..</span>
                    </div>
                    <div class="prod-price">¥59</div>
                    <div class="prod-boss">二口松舄惰主</div>
                    <div class="prod-sale">月销5000+</div>
                </div>
            </a>
         </li>
         
    </ul>
</div>
</body>
</html>

效果:

页面二:

代码:

<!DOCTYPE html>
<html lang="en">
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>登录界面</title>
<head>
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        .div {
            width: 100%;
            height: 800px;
            background-image: url(https://gw.alicdn.com/imgextra/i3/O1CN01iyYdem1GQd1yGgA0a_!!6000000000617-0-tps-2500-600.jpg);
            background-size: 100% 100%;
            background-repeat: no-repeat;
        }

        .login_box {
            /* 透明效果 */
            filter: alpha(Opacity=80);
            -moz-opacity: 0.8;
            opacity: 0.8;
            /* 登陆盒子属性 */
            float: left;
            width: 400px;
            height: 200px;
            background-color: white;
        }

        .empty_div1 {
            float: left;
            width: 100%;
            height: 200px;
            /* background-color: blue; */
        }

        .empty_div2 {
            float: left;
            width: 70%;
            height: 400px;
            /* background-color: blue; */
        }

        .empty_div3 {
            float: left;
            width: 100%;
            height: 20px;
            /* background-color: blue; */
        }

        .empty_div4 {
            float: left;
            width: 10%;
            height: 200px;
            /* background-color: red; */
        }

        .login_by_password {
            float: left;
            width: 20%;
            height: 25px;
            /* background-color: white; */
        }

        .login_by_short_message {
            float: right;
            width: 70%;
            height: 25px;
            /* background-color: greenyellow; */
        }

        .account {
            float: right;
            width: 90%;
            height: 50px;
            /* background-color: red; */
        }

        .password {
            float: right;
            width: 90%;
            height: 50px;
            /* background-color: pink; */
        }

        .empty_div7 {
            float: left;
            width: 40%;
            height: 25px;
            /* background-color: green; */
        }

        .login {
            float: right;
            width: 50%;
            height: 25px;
            /* background-color: white; */
        }

        .login_by_weibo {
            float: left;
            width: 50%;
            height: 25px;
            /* background-color: purple; */
        }

        .login_by_airpay {
            float: right;
            width: 40%;
            height: 25px;
            /* background-color: orange; */
        }
    </style>
</head>

</html>

<header>
    <img src="image/taobao.png">
</header>

<body>
    <div class="div">
        <div class="empty_div1">
        </div>

        <div class="empty_div2">
        </div>

        <div class="login_box">
            <div class="empty_div3">
            </div>

            <div class="empty_div4">
            </div>

            <div class="login_by_password">
                密码登陆
            </div>

            <div class="login_by_short_message">
                短信登陆
            </div>

            <div class="account">
                <img src="./people (1).png" width="20px" height="20px"> 登陆账号: <input placeholder="请输入您的账号"> </input>
            </div>

            <div class="password">
                <img src="./people (1).png" width="20px" height="20px" > 登陆密码: <input type="password" placeholder="请输入您的密码"> </input>
            </div>

            <div class="empty_div7">
            </div>

            <div class="login">
                <button>
                    登陆
                </button>
            </div>

            <div class="login_by_weibo">
                <img src="./people (1).png" width="20px" height="20px"> 微博登陆
            </div>

            <div class="login_by_airpay">
                <img src="./people (1).png" width="20px" height="20px"> 支付宝登陆
            </div>
        </div>
    </div>
</body>

<footer align="center">
    阿里巴巴集团&nbsp;&nbsp;|&nbsp;&nbsp;阿里巴巴国际站&nbsp;&nbsp;|&nbsp;&nbsp;阿里巴巴中国站&nbsp;&nbsp;|&nbsp;&nbsp;全球速卖通&nbsp;&nbsp;|&nbsp;&nbsp;淘宝网&nbsp;&nbsp;|&nbsp;&nbsp;天猫&nbsp;&nbsp;|&nbsp;&nbsp;聚划算&nbsp;&nbsp;|&nbsp;&nbsp;一淘&nbsp;&nbsp;|&nbsp;&nbsp;阿里妈妈&nbsp;&nbsp;|&nbsp;&nbsp;飞猪&nbsp;&nbsp;|&nbsp;&nbsp;虾米&nbsp;&nbsp;|&nbsp;&nbsp;阿里云计算&nbsp;&nbsp;|&nbsp;&nbsp;云OS&nbsp;&nbsp;|&nbsp;&nbsp;万网&nbsp;&nbsp;|&nbsp;&nbsp;支付宝&nbsp;&nbsp;|&nbsp;&nbsp;来往
</footer>```

效果:

页面三:

代码:

<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>淘宝购物车页面实现</title>
		<style>
		.Tbsl{
			background-color: #FFFFFF;
			height: 80px;
			margin: 0px 0px 24px;
		}
		
		.box{
			
			text-align: center;
			overflow: hidden;
			
		}
		
		button{
			height: 18px;
			width: 22px;
			text-align: center;
			border: #F5F5F5;	
		}
 
			 </style>
	</head>
	<body>
		<table>		
			<tr>
				<td width="68%"> </td>
				<td>
					<div id="Tbsl">
						<select style=" outline: none; width:50px;height:32px;border: 3px solid orangered;border-right: none;color: gainsboro;">
							<option selected="selected" disabled="disabled">宝贝</option>
							<optgroup label="鞋靴">
							<option value="1">单鞋</option>
							<option value="2" >运动鞋</option>
							<option value="3">皮鞋</option>
							</optgroup>
							<optgroup label="服装">
							<option value="4">毛衣</option>
							<option value="5">衬衫</option>
							<option value="6">休闲裤</option>
						</select><input type="search" style="outline: none; border: 3px solid orangered; border-left: none; border-right: none; height: 31px; width:250px;"/><button style="color: #F5F5F5; width: 50px; height: 32px;background-color: red;border-color: red;">搜索</button> 
					</div>
					
				</td>
			</tr>
			
		</table>
		<table  border="0" width="1300px"height="500px">
			<thead style="height: 30px;">
				<th align="right"><input type="checkbox" name="全选"/></th>
				<th align="left">全选</th>
				<th colspan="2">商品信息</th>
				<th>单价</th>
				<th width="5%">数量</th>
				<th>金额</th>
				<th>操作</th>
			</thead>
			<tr height="30px">
				<td align="right"><input type="checkbox" name="勾选"/></td>
				<td colspan="10">店铺:hallner夏利奴旗舰 </td>
			
			</tr>
			<tr height="30px">
				<td align="right"><input type="checkbox" name="勾选"/></td>
				<td><img src="https://img.alicdn.com/imgextra/i2/6601588199/O1CN01f11iJc2ARCJTR4REV_!!0-saturn_solar.jpg_360x360xzq75.jpg_.webp"width="150px"height="150px"/></td>
				<td  width="35%"> <a href="https://www.taobao.com">2024春季新款韩版小白鞋女学生百搭懒人——脚踝平底单鞋休闲帆布鞋</a>
				<br/>
				</td>
				<td><font color="gainsboro">颜色分类:白色,<br/>尺码:39</font> </td>
				<td>
					<del><font color="grey">¥132.00</font></p></del> 
					<p>¥19.99</p>
				</td>
				<td align="center" width="10%">
					<div class="box">
						
						<button>+</button><input type="number" value="1" style="border: none; height: 16px;width:30px;text-align: center;"/><button>-</button>
						
					</div>
					
					</td>
				<td>
					<font color="red">¥19.99</font></td>
				<td>
					<a href="#">移入收藏夹</a>
					</br>
					<a href="#">删除</a>
				</td>
			</tr>
			
			<tr height="30px">
				<td align="right"><input type="checkbox" name="勾选"/></td>
				<td colspan="10">店铺:warrior回力万成专卖店</td>
			
			</tr>
			<tr height="30px">
				<td align="right">
					<input type="checkbox" name="勾选"/></td>
				<td>
					<img src="https://img.alicdn.com/imgextra/i4/5525706802/O1CN01Vcm5F7207N0i0l6nv_!!0-saturn_solar.jpg_360x360xzq75.jpg_.webp"width="150px"height="150px" />
				</td>
				<td>
					<a href="https://www.taobao.com">2024新款平底复古系带马丁靴女冬——加绒高帮英伦风机动车靴低跟短靴潮</a>
					<br/>
					</td>
				<td><font color="gainsboro">颜色分类:白色,<br/>尺码:39</font> </td>
				<td> 
				<del><font color="grey">¥179.00</font></p></del> 
				<p>¥59.99</p>
				</td>
				<td> 
				<div class="box">
					<button>+</button><input type="number" value="1" style=" border: none; height: 16px;width: 30px;text-align: center;"/><button>-</button>
					
				</td>
				<td><font color="red">¥59.99</font> </td>
				<td><a href="#">移入收藏夹</a>
					</br>
					<a href="#">删除</a> </td>
			</tr>
			<tfoot align="right" style="background-color: gainsboro;">
				<tr>
					<td colspan="8">合计(不含运费):0元<span>&nbsp;</span>
					<input type="button" value="结算"style="background-color: red; width: 34px;height: 25px;color: #F5F5F5;border: none;"/>
					</td>
				</tr>
			</tfoot>
		</table>
	</body>
</html>

效果:

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值