HTML5+CSS3实现小米商城 (完整版)

news/2024/12/28 16:14:23/

前言

对于小米商城,也是自己初学前端的一个小作品吧,这个网页大概写了有三四天吧,总体感受就是写着还行,只要有耐心,就一定能成功。

一 、网页分析

1. 头部导航栏。

2. 两边的侧边栏。

3.中间的轮播图。

4.下面的广告部分。

二 、效果展示

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

三 、代码分析

注 :因为代码较多,这里展示部分,全部代码 放在下方 链接网盘里。

1. 轮播图部分

 .head3 {  // CSS部分width: 1226px;margin-left: 146px;margin-right: 146px;height: 400px;margin-top: 14px;margin-bottom: 35px;overflow: hidden;float: left;}.head3_lunbo {width: 4904px;height: 400px;animation: text 15s infinite backwards;/*消除图片间隔*/}.head3_lunbo img {width: 1226px;height: 400px;float: left;}@keyframes text {/*0%-20%是播放下一个图片,0%-10%是图片暂停的时间*/0%,20% {margin-left: 0px;}25%,45% {margin-left: -1226px;}50%,70% {margin-left: -2452px;}75%,100% {margin-left: -3678px;}}
 <div class="head3_lunbo"><!-- 引入轮播图图片 --><a href="#" target="_blank"><img src="ding1.jpg" /></a><a href="#" target="_blank"><img src="ding2.webp" /></a><a href="#" target="_blank"><img src="ding3.webp" /></a><a href="#" target="_blank"><img src="ding4.webp" /></a></div>

2. 广告块部分


<!-- 手机模块  HTML--><div class="con2"><div class="con2_1"><span class="con2_1_s1">手机</span><a class="con2_1_a" href="#"><span class="con2_1_s2">查看更多</span><span class="con2_1_img"></span></a></div><div class="con2_2"><div class="con2_2_1"><a href="#"><img src="shouji.png" style="height: 631px;"></a></div><div class="con2_2_2"><div class="con2_2_2_div"><a class="con2_2_a" href="#"><img class="con2_2_2_img" src="shouji1.webp"><h4 class="con2_2_h">Xiaomi 12S Ultra</h4><p class="con2_2_p1">这真徕卡&nbsp;&nbsp;|&nbsp;&nbsp;专业徕卡影像</p><!-- <p style="text-decoration: line-through" class="con2_2_p2">5999元起</p> --><span class="huadiao_1">9.9元起</span><span class="huadiao_2">5999元起</span></a></div><div class="con2_2_2_div"><a class="con2_2_a" href="#"><img class="con2_2_2_img" src="shouji2.webp"><h4 class="con2_2_h">Xiaomi 12S Pro</h4><p class="con2_2_p1">骁龙8+ 旗舰处理器&nbsp;&nbsp;|&nbsp;&nbsp;徕卡影像</p><span class="huadiao_1">8.8元起</span><span class="huadiao_2">5999元起</span></a></div><div class="con2_2_2_div"><a class="con2_2_a" href="#"><img class="con2_2_2_img" src="shouji3.webp"><h4 class="con2_2_h">Xiaomi 12S</h4><p class="con2_2_p1">小尺寸性能旗舰&nbsp;&nbsp;|&nbsp;&nbsp;徕卡影像</p><p class="con2_2_p2">3999元起</p></a></div><div class="con2_2_2_div"><a class="con2_2_a" href="#"><img class="con2_2_2_img" src="shouji4.webp"><h4 class="con2_2_h">Xiaomi 12S Pro 天玑版</h4><p class="con2_2_p1 ">全球首发天玑9000+&nbsp;&nbsp;|&nbsp;&nbsp;叶脉冷泵散热系统超强</p><p class="con2_2_p2">3999元起</p></a></div><div class="con2_2_2_div"><a class="con2_2_a" href="#"><img class="con2_2_2_img" src="shouji5.webp"><h4 class="con2_2_h">Redmi Note 11T Pro+</h4><p class="con2_2_p1">天玑8100&nbsp;&nbsp;|&nbsp;&nbsp;真旗舰芯</p><span class="huadiao_1">61.88元起</span><span class="huadiao_2">5999元起</span></a></div><div class="con2_2_2_div"><a class="con2_2_a" href="#"><img class="con2_2_2_img" src="shouji6.webp"><h4 class="con2_2_h">Redmi Note 11T Pro</h4><p class="con2_2_p1">天玑8100&nbsp;&nbsp;|&nbsp;&nbsp;真旗舰芯</p><p class="con2_2_p2">1699元起</p></a></div><div class="con2_2_2_div"><a class="con2_2_a" href="#"><img class="con2_2_2_img" src="shouji7.webp"><h4 class="con2_2_h">Redmi Note 11SE</h4><p class="con2_2_p1">双卡双5G&nbsp;&nbsp;|&nbsp;&nbsp;疾速登陆</p><span class="huadiao_1">0.01元起</span><span class="huadiao_2">5999元起</span></a></div><div class="con2_2_2_div"><a class="con2_2_a" href="#"><img class="con2_2_2_img" src="shouji8.webp"><h4 class="con2_2_h">Xiaomi Civi 1S</h4><p class="con2_2_p1 " style="margin-left:0px;">原生美肌人像&nbsp;&nbsp;|&nbsp;&nbsp;奇迹阳光动人新色&nbsp;&nbsp;|&nbsp;&nbsp;旗舰神机器</p><p class="con2_2_p2">2299元起</p></a></div></div></div></div>
 .con2 {  // CSS部分width: 1226px;height: 672px;}.con2_1 {width: 1226px;height: 58px;}.con2_1_a {display: inline-block;text-decoration: none;}.con2_1_img {display: inline-block;background-image: url(xiala.jpg);background-repeat: no-repeat;width: 38px;height: 34px;position: relative;top: 10px;}.con2_1_s1 {font-size: 24px;margin-right: 1050px;line-height: 58px;font-weight: 150;}.con2_1_s2 {color: #454349;/* margin-bottom: 5px; *//* float: right; */}.con2_1_s2:hover {color: #ff6700;}.con2_2 {width: 1226px;height: 641px;}.con2_2_1 {display: inline-block;width: 224px;height: 641px;margin-top: 10px;margin-right: 14px;transition: all .2s linear;}.con2_2_1_plus {display: inline-block;width: 224px;height: 61px;margin-top: 10px;margin-right: 14px;/* transition: all .2s linear; */}.con2_2_1_pro {display: inline-block;width: 224px;height: 61px;margin-top: 10px;margin-right: 14px;/* transition: all .2s linear; */}/* .con2_2_1:hover {box-shadow: 4px 20px 40px 5px rgba(0, 0, 0, .1);margin-top: 8px;} */.con2_2_2 {width: 973px;height: 641px;/* background-color: blue; *//* position: relative; */display: -webkit-flex;display: flex;/* -webkit-flex-wrap: wrap; */flex-wrap: wrap;float: right;align-content: space-between;justify-content: space-between;}.con2_2_2_div {display: inline-block;width: 230px;height: 308px;background-color: #ffffff;margin-top: 10px;/* display: block; */transition: all .2s linear;}.con2_2_2_div:hover {box-shadow: 4px 20px 40px 5px rgba(0, 0, 0, .1);margin-top: 8px;/* margin-bottom: 8px; */}.con2_2_2_div_plus {margin-top: 50px;display: inline-block;width: 230px;height: 30px;background-color: #ffffff;/* margin-top: 10px; *//* display: block; */}.con2_2_a {display: inline-block;width: 230px;height: 308px;text-decoration: none;}.con2_2_2_img {width: 150px;height: 165px;margin-left: 40px;margin-top: 20px;}.con2_2_h {color: #444444;font-weight: 500;font-size: 15px;/* margin-left: 56px; */white-space: nowrap;overflow: hidden;text-overflow: ellipsis;text-align: center;}.con2_2_p1 {font-size: 12px;color: #b1b0b1;/* margin-left: 45px; */margin-top: 7px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;text-align: center;}.con2_2_p2 {font-size: 15px;color: #ff6c0d;/* margin-left: 79px; */margin-top: 10px;text-align: center;}

3. 右侧固定栏

 <!-- HTML部分 --! ><div class="cebian"><div class="cebian_1"><a href="#"><img src="cebian1.png"><p>手机APP</p></a><div class="cebian_2" style="width: 150px;height: 180px;"><img src="erweima.png" style="width:80px ;height:80px;"><p style="margin-top: 10px;">扫码领取新</p><p>人百元红包</p></div></div><div><a href="#"><img src="cebian2.png"><p>个人中心</p></a></div><div><a href="#"><img src="cebian3.png"><p>售后服务</p></a></div><div><a href="#"><img src="cebian4.png"><p>人工服务</p></a></div><div><a href="#" class="cebiandiv"><img src="cebian5.png"><p>购物车</p></a></div></div>
 // CSS部分.cebian {position: fixed;width: 94px;height: 455px;top: 40px;background-color: #ffffff;left: 1423px;border-left: 1px solid #f6f6f6;border-bottom: 1px solid #f6f6f6;border-top: 1px solid #f6f6f6;}.cebian div {width: 94px;height: 91px;border-bottom: 1px solid #f6f6f6;}.cebian_1 {width: 94px;height: 91px;border-bottom: 1px solid #f6f6f6;z-index: 5;}.cebian_2 {/* padding: 14px; */background-color: #ffffff;position: absolute;left: -150px;top: -1px;border-bottom: 1px solid #f6f6f6;display: none;z-index: 5;}.cebian_1:hover .cebian_2 {display: block;z-index: 5;}.cebiandiv {border-bottom: 1px solid #f5f5f5;}.cebian img {margin-top: 18px;margin-left: 32px;/* margin: 0 auto; */width: 30px;height: 30px;}.cebian p {color: #999999;text-align: center;}.cebian a {display: inline-block;text-decoration: none;width: 94px;height: 91px;}.cebian p:hover {color: #ff6700;}

4.左侧导航栏

<!--HTML部分--!><div class="head3_div1"><div class="head3_div1_1"><span class="head3_div1_s"><span class="head3_div1_s1">手机</span><span class="head3_div1_s2"></span></span><div class="head3_div1_1_2"><span class="head3_div1_1_2s"><img src="shouji1.webp"><span>Xiaomi 12S</span></span><span class="head3_div1_1_2s"><img src="shouji1.webp"><span>Redmi 10A</span></span><span class="head3_div1_1_2s"><img src="shouji1.webp"><span>Xiaomi 12S</span></span><span class="head3_div1_1_2s"><img src="shouji2.webp"><span>Xiaomi 12S</span></span><span class="head3_div1_1_2s"><img src="shouji3.webp"><span>iphone 13</span></span><span class="head3_div1_1_2s"><img src="shouji1.webp"><span>Xiaomi 12S</span></span><span class="head3_div1_1_2s"><img src="shouji4.webp"><span>Xiaomi 12S</span></span><span class="head3_div1_1_2s"><img src="shouji2.webp"><span>Xiaomi 12S</span></span><span class="head3_div1_1_2s"><img src="shouji1.webp"><span>Redmi K50</span></span><span class="head3_div1_1_2s"><img src="shouji3.webp"><span>Xiaomi 12S</span></span><span class="head3_div1_1_2s"><img src="shouji5.webp"><span>Xiaomi 12S</span></span><span class="head3_div1_1_2s"><img src="shouji4.webp"><span>Xiaomi 12S</span></span><span class="head3_div1_1_2s"><img src="shouji1.webp"><span>Note 11 4G</span></span><span class="head3_div1_1_2s"><img src="shouji6.webp"><span>Xiaomi 12S</span></span><span class="head3_div1_1_2s"><img src="shouji5.webp"><span>Xiaomi 12S</span></span><span class="head3_div1_1_2s"><img src="shouji4.webp"><span>Redmi K40S</span></span><span class="head3_div1_1_2s"><img src="shouji1.webp"><span>Xiaomi 12S</span></span><span class="head3_div1_1_2s"><img src="shouji6.webp"><span>Xiaomi 12S</span></span><span class="head3_div1_1_2s"><img src="shouji1.webp"><span>Xiaomi 12S</span></span><span class="head3_div1_1_2s"><img src="shouji6.webp"><span>黑鲨5</span></span><span class="head3_div1_1_2s"><img src="shouji2.webp"><span>Xiaomi 12S</span></span><span class="head3_div1_1_2s"><img src="shouji3.webp"><span>Note 11T Pro</span></span><span class="head3_div1_1_2s"><img src="shouji1.webp"><span>Xiaomi 12S</span></span><span class="head3_div1_1_2s"><img src="shouji2.webp"><span>Xiaomi Civi</span></span></div></div><div class="head3_div1_2"><span class="head3_div2_s"><span class="head3_div1_s1">电视</span><span class="head3_div1_s2"></span></span><div class="head3_div2_1_2"><span class="head3_div1_1_2s"><img src="dianshi1.webp"><span>Xiaomi 12S</span></span><span class="head3_div1_1_2s"><img src="dianshi2.webp"><span>Redmi 10A</span></span><span class="head3_div1_1_2s"><img src="shouji1.webp"><span>Redmi X65 2022款</span></span><span class="head3_div1_1_2s"><img src="dianshi2.webp"><span>小米电视6至尊版 65英寸</span></span><span class="head3_div1_1_2s"><img src="shouji3.webp"><span>iphone 13</span></span><span class="head3_div1_1_2s"><img src="dianshi5.webp"><span>小米电视6 65" OLED</span></span><span class="head3_div1_1_2s"><img src="bijiben4.webp"><span>小米电视5 75英寸</span></span><span class="head3_div1_1_2s"><img src="shouji2.webp"><span>Xiaomi 12S</span></span><span class="head3_div1_1_2s"><img src="dianshi1.webp"><span>Redmi K50</span></span><span class="head3_div1_1_2s"><img src="shouji3.webp"><span>Redmi智能电视X55 55英寸</span></span><span class="head3_div1_1_2s"><img src="shouji5.webp"><span>小米电视ES43 2022款</span></span><span class="head3_div1_1_2s"><img src="shouji4.webp"><span>Xiaomi 12S</span></span><span class="head3_div1_1_2s"><img src="dianshi7.webp"><span>小米电视5 75英寸</span></span><span class="head3_div1_1_2s"><img src="shouji6.webp"><span>小米电视5 75英寸</span></span><span class="head3_div1_1_2s"><img src="shouji5.webp"><span>Xiaomi 12S</span></span><span class="head3_div1_1_2s"><img src="dianshi8.webp"><span>Redmi K40S</span></span><span class="head3_div1_1_2s"><img src="shouji1.webp"><span>小米电视5 75英寸</span></span><span class="head3_div1_1_2s"><img src="shouji6.webp"><span>Xiaomi 12S</span></span><span class="head3_div1_1_2s"><img src="dianshi1.webp"><span>Xiaomi 12S</span></span><span class="head3_div1_1_2s"><img src="shouji6.webp"><span>黑鲨5</span></span><span class="head3_div1_1_2s"><img src="dianshi2.webp"><span>Xiaomi 12S</span></span><span class="head3_div1_1_2s"><img src="shouji3.webp"><span>Note 11T Pro</span></span><span class="head3_div1_1_2s"><img src="dianshi5.webp"><span>小米电视ES43 2022款</span></span><span class="head3_div1_1_2s"><img src="dianshi7.webp"><span>小米电视ES43 2022款</span></span></div></div><div class="head3_div1_3"><span class="head3_div3_s"><span class="head3_div1_s1">笔记本 平板</span><span class="head3_div1_s2"></span></span><div class="head3_div3_1_2"><span class="head3_div1_1_2s"><img src="dianshi1.webp"><span>Xiaomi 12S</span></span><span class="head3_div1_1_2s"><img src="dianshi2.webp"><span>Redmi 10A</span></span><span class="head3_div1_1_2s"><img src="shouji1.webp"><span>Redmi X65 2022款</span></span><span class="head3_div1_1_2s"><img src="dianshi2.webp"><span>小米电视6至尊版 65英寸</span></span><span class="head3_div1_1_2s"><img src="shouji3.webp"><span>iphone 13</span></span><span class="head3_div1_1_2s"><img src="dianshi5.webp"><span>小米电视6 65" OLED</span></span><span class="head3_div1_1_2s"><img src="bijiben4.webp"><span>小米电视5 75英寸</span></span><span class="head3_div1_1_2s"><img src="shouji2.webp"><span>Xiaomi 12S</span></span><span class="head3_div1_1_2s"><img src="dianshi1.webp"><span>Redmi K50</span></span><span class="head3_div1_1_2s"><img src="shouji3.webp"><span>Redmi智能电视X55 55英寸</span></span><span class="head3_div1_1_2s"><img src="shouji5.webp"><span>小米电视ES43 2022款</span></span><span class="head3_div1_1_2s"><img src="shouji4.webp"><span>Xiaomi 12S</span></span><span class="head3_div1_1_2s"><img src="dianshi7.webp"><span>小米电视5 75英寸</span></span><span class="head3_div1_1_2s"><img src="shouji6.webp"><span>小米电视5 75英寸</span></span><span class="head3_div1_1_2s"><img src="shouji5.webp"><span>Xiaomi 12S</span></span><span class="head3_div1_1_2s"><img src="dianshi8.webp"><span>小米平板5Pro</span></span><span class="head3_div1_1_2s"><img src="shouji1.webp"><span>小米电视5 75英寸</span></span><span class="head3_div1_1_2s"><img src="shouji6.webp"><span>小米笔记本 Pro 14</span></span><span class="head3_div1_1_2s"><img src="dianshi1.webp"><span>Xiaomi 12S</span></span><span class="head3_div1_1_2s"><!-- <img src="shouji6.webp"><span>黑鲨5</span> --></span><span class="head3_div1_1_2s"><img src="dianshi2.webp"><span>Xiaomi 12S</span></span><span class="head3_div1_1_2s"><img src="shouji3.webp"><span>Note 11T Pro</span></span><span class="head3_div1_1_2s"><img src="dianshi5.webp"><span>小米电视ES43 2022款</span></span></div></div><div class="head3_div1_4"><span class="head3_div4_s"><span class="head3_div1_s1">出行 穿戴</span><span class="head3_div1_s2"></span></span><div class="head3_div4_1_2"><span class="head3_div1_1_2s"><img src="dianshi1.webp"><span>Xiaomi 12S</span></span><span class="head3_div1_1_2s"><img src="dianshi2.webp"><span>Redmi 10A</span></span><span class="head3_div1_1_2s"><img src="shouji1.webp"><span>Redmi X65 2022款</span></span><span class="head3_div1_1_2s"><img src="dianshi2.webp"><span>小米电视6至尊版 65英寸</span></span><span class="head3_div1_1_2s"><img src="shouji3.webp"><span>iphone 13</span></span><span class="head3_div1_1_2s"><img src="dianshi5.webp"><span>小米电视6 65" OLED</span></span><span class="head3_div1_1_2s"><img src="bijiben4.webp"><span>小米电视5 75英寸</span></span><span class="head3_div1_1_2s"><img src="shouji2.webp"><span>Xiaomi 12S</span></span><span class="head3_div1_1_2s"><img src="dianshi1.webp"><span>Redmi K50</span></span><span class="head3_div1_1_2s"><img src="shouji3.webp"><span>Redmi智能电视X55 55英寸</span></span><span class="head3_div1_1_2s"><img src="shouji5.webp"><span>小米电视ES43 2022款</span></span><span class="head3_div1_1_2s"><!-- <img src="shouji4.webp"><span>Xiaomi 12S</span> --></span><span class="head3_div1_1_2s"><img src="dianshi7.webp"><span>小米电视5 75英寸</span></span><span class="head3_div1_1_2s"><img src="shouji6.webp"><span>小米电视5 75英寸</span></span><span class="head3_div1_1_2s"><!-- <img src="shouji5.webp"><span>Xiaomi 12S</span> --></span><span class="head3_div1_1_2s"><img src="dianshi8.webp"><span>Redmi K40S</span></span><span class="head3_div1_1_2s"><img src="shouji1.webp"><span>小米电视5 75英寸</span></span></div></div><div class="head3_div1_5"><span class="head3_div5_s"><span class="head3_div1_s1">耳机 音箱</span><span class="head3_div1_s2"></span></span><div class="head3_div5_1_2"><span class="head3_div1_1_2s"><img src="dianshi1.webp"><span>Xiaomi 12S</span></span><span class="head3_div1_1_2s"><img src="dianshi2.webp"><span>Redmi 10A</span></span><span class="head3_div1_1_2s"><img src="shouji1.webp"><span>Redmi X65 2022款</span></span><span class="head3_div1_1_2s"><img src="dianshi2.webp"><span>小米电视6至尊版 65英寸</span></span><span class="head3_div1_1_2s"><img src="shouji3.webp"><span>iphone 13</span></span><span class="head3_div1_1_2s"><img src="dianshi5.webp"><span>小米电视6 65" OLED</span></span><span class="head3_div1_1_2s"><img src="bijiben4.webp"><span>小米电视5 75英寸</span></span><span class="head3_div1_1_2s"><img src="shouji2.webp"><span>Xiaomi 12S</span></span><span class="head3_div1_1_2s"><img src="dianshi1.webp"><span>Redmi K50</span></span><span class="head3_div1_1_2s"><img src="shouji3.webp"><span>Redmi智能电视X55 55英寸</span></span><span class="head3_div1_1_2s"><img src="shouji5.webp"><span>小米电视ES43 2022款</span></span><span class="head3_div1_1_2s"><!-- <img src="shouji4.webp"><span>Xiaomi 12S</span> --></span><span class="head3_div1_1_2s"><img src="dianshi7.webp"><span>小米电视5 75英寸</span></span><span class="head3_div1_1_2s"><img src="shouji6.webp"><span>小米电视5 75英寸</span></span><span class="head3_div1_1_2s"><img src="shouji5.webp"><span>Xiaomi 12S</span></span><span class="head3_div1_1_2s"><!-- <img src="dianshi8.webp"><span>Redmi K40S</span> --></span><span class="head3_div1_1_2s"><img src="shouji1.webp"><span>小米电视5 75英寸</span></span><span class="head3_div1_1_2s"><img src="shouji6.webp"><span>Xiaomi 12S</span></span><span class="head3_div1_1_2s"><img src="dianshi1.webp"><span>Xiaomi 12S</span></span><span class="head3_div1_1_2s"><!-- <img src="shouji6.webp"><span>黑鲨5</span> --></span><span class="head3_div1_1_2s"><img src="dianshi2.webp"><span>Xiaomi 12S</span></span><span class="head3_div1_1_2s"><img src="shouji3.webp"><span>Note 11T Pro</span></span><span class="head3_div1_1_2s"><img src="dianshi5.webp"><span>小米电视ES43 2022款</span></span><!-- <span class="head3_div1_1_2s"><img src="dianshi7.webp"><span>小米电视ES43 2022款</span></span> --></div></div><div class="head3_div1_6"><span class="head3_div6_s"><span class="head3_div1_s1">家电</span><span class="head3_div1_s2"></span></span><div class="head3_div6_1_2"><span class="head3_div1_1_2s"><img src="dianshi1.webp"><span>Xiaomi 12S</span></span><span class="head3_div1_1_2s"><img src="dianshi2.webp"><span>Redmi 10A</span></span><span class="head3_div1_1_2s"><img src="shouji1.webp"><span>Redmi X65 2022款</span></span><span class="head3_div1_1_2s"><img src="dianshi2.webp"><span>小米电视6至尊版 65英寸</span></span><span class="head3_div1_1_2s"><img src="shouji3.webp"><span>iphone 13</span></span><span class="head3_div1_1_2s"><img src="dianshi5.webp"><span>小米电视6 65" OLED</span></span><span class="head3_div1_1_2s"><img src="bijiben4.webp"><span>小米电视5 75英寸</span></span><span class="head3_div1_1_2s"><img src="shouji2.webp"><span>Xiaomi 12S</span></span><span class="head3_div1_1_2s"><img src="dianshi1.webp"><span>Redmi K50</span></span><span class="head3_div1_1_2s"><img src="shouji3.webp"><span>Redmi智能电视X55 55英寸</span></span><span class="head3_div1_1_2s"><img src="shouji5.webp"><span>小米电视ES43 2022款</span></span><span class="head3_div1_1_2s"><img src="shouji4.webp"><span>Xiaomi 12S</span></span><span class="head3_div1_1_2s"><img src="dianshi7.webp"><span>小米电视5 75英寸</span></span><span class="head3_div1_1_2s"><img src="shouji6.webp"><span>小米电视5 75英寸</span></span><span class="head3_div1_1_2s"><img src="shouji5.webp"><span>Xiaomi 12S</span></span><span class="head3_div1_1_2s"><img src="dianshi8.webp"><span>Redmi K40S</span></span><span class="head3_div1_1_2s"><img src="shouji1.webp"><span>小米电视5 75英寸</span></span><span class="head3_div1_1_2s"><img src="shouji6.webp"><span>Xiaomi 12S</span></span><span class="head3_div1_1_2s"><img src="dianshi1.webp"><span>Xiaomi 12S</span></span><span class="head3_div1_1_2s"><img src="shouji6.webp"><span>黑鲨5</span></span><span class="head3_div1_1_2s"><img src="dianshi2.webp"><span>Xiaomi 12S</span></span><span class="head3_div1_1_2s"><img src="shouji3.webp"><span>Note 11T Pro</span></span><span class="head3_div1_1_2s"><img src="dianshi5.webp"><span>小米电视ES43 2022款</span></span><span class="head3_div1_1_2s"><img src="dianshi7.webp"><span>小米电视ES43 2022款</span></span></div></div><div class="head3_div1_7"><span class="head3_div7_s"><span class="head3_div1_s1">智能 路由器</span><span class="head3_div1_s2"></span></span><div class="head3_div7_1_2"><span class="head3_div1_1_2s"><img src="dianshi1.webp"><span>Xiaomi 12S</span></span><span class="head3_div1_1_2s"><img src="dianshi2.webp"><span>Redmi 10A</span></span><span class="head3_div1_1_2s"><img src="shouji1.webp"><span>Redmi X65 2022款</span></span><span class="head3_div1_1_2s"><img src="dianshi2.webp"><span>小米电视6至尊版 65英寸</span></span><span class="head3_div1_1_2s"><img src="shouji3.webp"><span>iphone 13</span></span><span class="head3_div1_1_2s"><img src="dianshi5.webp"><span>小米电视6 65" OLED</span></span><span class="head3_div1_1_2s"><img src="bijiben4.webp"><span>小米电视5 75英寸</span></span><span class="head3_div1_1_2s"><img src="shouji2.webp"><span>Xiaomi 12S</span></span><span class="head3_div1_1_2s"><!-- <img src="dianshi1.webp"><span>Redmi K50</span> --></span><span class="head3_div1_1_2s"><img src="shouji3.webp"><span>Redmi智能电视X55 55英寸</span></span><span class="head3_div1_1_2s"><img src="shouji5.webp"><span>小米电视ES43 2022款</span></span><span class="head3_div1_1_2s"><!-- <img src="shouji4.webp"><span>Xiaomi 12S</span> --></span><span class="head3_div1_1_2s"><img src="dianshi7.webp"><span>小米电视5 75英寸</span></span><span class="head3_div1_1_2s"><img src="shouji6.webp"><span>小米电视5 75英寸</span></span><span class="head3_div1_1_2s"><!-- <img src="shouji5.webp"><span>Xiaomi 12S</span> --></span><span class="head3_div1_1_2s"><img src="dianshi8.webp"><span>Redmi K40S</span></span><span class="head3_div1_1_2s"><img src="shouji1.webp"><span>小米电视5 75英寸</span></span></div></div><div class="head3_div1_8"><span class="head3_div8_s"><span class="head3_div1_s1">电源 配件</span><span class="head3_div1_s2"></span></span><div class="head3_div8_1_2"><span class="head3_div1_1_2s"><img src="dianshi1.webp"><span>Xiaomi 12S</span></span><span class="head3_div1_1_2s"><img src="dianshi2.webp"><span>Redmi 10A</span></span><span class="head3_div1_1_2s"><img src="shouji1.webp"><span>Redmi X65 2022款</span></span><span class="head3_div1_1_2s"><img src="dianshi2.webp"><span>小米电视6至尊版 65英寸</span></span><span class="head3_div1_1_2s"><img src="shouji3.webp"><span>iphone 13</span></span><span class="head3_div1_1_2s"><img src="dianshi5.webp"><span>小米电视6 65" OLED</span></span><span class="head3_div1_1_2s"><img src="bijiben4.webp"><span>小米电视5 75英寸</span></span><span class="head3_div1_1_2s"><img src="shouji2.webp"><span>Xiaomi 12S</span></span><span class="head3_div1_1_2s"><img src="dianshi1.webp"><span>Redmi K50</span></span><span class="head3_div1_1_2s"><img src="shouji3.webp"><span>Redmi智能电视X55 55英寸</span></span><span class="head3_div1_1_2s"><img src="shouji5.webp"><span>小米电视ES43 2022款</span></span></div></div><div class="head3_div1_9"><span class="head3_div9_s"><span class="head3_div1_s1">健康 儿童</span><span class="head3_div1_s2"></span></span><div class="head3_div9_1_2"><span class="head3_div1_1_2s"><img src="dianshi1.webp"><span>Xiaomi 12S</span></span><span class="head3_div1_1_2s"><img src="dianshi2.webp"><span>Redmi 10A</span></span><span class="head3_div1_1_2s"><img src="shouji1.webp"><span>Redmi X65 2022款</span></span><span class="head3_div1_1_2s"><img src="dianshi2.webp"><span>小米电视6至尊版 65英寸</span></span><span class="head3_div1_1_2s"><img src="shouji3.webp"><span>iphone 13</span></span><span class="head3_div1_1_2s"><img src="dianshi5.webp"><span>小米电视6 65" OLED</span></span><span class="head3_div1_1_2s"><img src="bijiben4.webp"><span>小米电视5 75英寸</span></span><span class="head3_div1_1_2s"><img src="shouji2.webp"><span>Xiaomi 12S</span></span><span class="head3_div1_1_2s"><img src="dianshi1.webp"><span>Redmi K50</span></span><span class="head3_div1_1_2s"><img src="shouji3.webp"><span>Redmi智能电视X55 55英寸</span></span><span class="head3_div1_1_2s"><img src="shouji5.webp"><span>小米电视ES43 2022款</span></span><span class="head3_div1_1_2s"><img src="shouji4.webp"><span>Xiaomi 12S</span></span><span class="head3_div1_1_2s"><img src="dianshi7.webp"><span>小米电视5 75英寸</span></span><span class="head3_div1_1_2s"><img src="shouji6.webp"><span>小米电视5 75英寸</span></span><span class="head3_div1_1_2s"><!-- <img src="shouji5.webp"><span>Xiaomi 12S</span> --></span><span class="head3_div1_1_2s"><img src="dianshi8.webp"><span>Redmi K40S</span></span><span class="head3_div1_1_2s"><img src="shouji1.webp"><span>小米电视5 75英寸</span></span></div></div><!--<div class="head3_div1_1"><span class="head3_div1_s"></span></div> --></div></div>
// CSS 部分.head3_div1 {width: 234px;height: 400px;/* padding-top: 20px; *//* padding-bottom: 20px; *//* background-color: #7d7389; */background-color: rgba(105, 101, 101, .6);position: absolute;/* top: -40px; */top: 154px;}.head3_div1_1 {width: 234px;height: 62px;color: #ffffff;position: absolute;float: left;}.head3_div1_s {width: 234px;height: 42px;/* padding-left: 30px; */float: left;margin-top: 20px;}.head3_div1_s1 {margin-left: 40px;float: left;position: absolute;top: 28px;}.head3_div1_s2 {background-image: url(you.png);width: 16px;height: 16px;background-repeat: no-repeat;position: absolute;right: 20px;top: 30px;}.head3_div1_s:hover {background-color: #ff6700;}.head3_div1_1_2 {width: 992px;height: 400px;/* background-color: red; */background-color: #ffffff;/* position: relative; */position: absolute;right: -993px;/* top: -120px; */display: -webkit-flex;display: flex;-webkit-flex-wrap: wrap;align-content: flex-start;/* flex-grow: 1; */display: none;}.head3_div1_1_2s {/* display: inline-block; */width: 247px;height: 65px;/* background-color: aqua; */float: left;/* margin: 10px; */}.head3_div1_1_2s img {margin-left: 20px;height: 60px;width: 45px;}.head3_div1_1_2s span {color: #3e3e3e;position: relative;top: -28px;font-size: 14px;}.head3_div1_1_2s span:hover {color: #ff6700;cursor: pointer;}.head3_div1_1:hover .head3_div1_1_2 {display: block;}.head3_div1_2 {width: 234px;height: 42px;/* float: left; */position: absolute;top: 62px;color: #ffffff;}.head3_div2_s {width: 234px;height: 42px;/* padding-left: 30px; */float: left;/* margin-top: 20px; */}.head3_div2_s>span {position: absolute;top: 10px;}.head3_div2_s:hover {background-color: #ff6700;}.head3_div2_1_2 {width: 992px;height: 400px;/* background-color: red; */background-color: #ffffff;/* position: relative; */position: absolute;right: -993px;top: -62px;/* top: -120px; */display: -webkit-flex;display: flex;-webkit-flex-wrap: wrap;align-content: flex-start;/* flex-grow: 1; */display: none;}.head3_div1_2:hover .head3_div2_1_2 {display: block;}.head3_div1_3 {width: 234px;height: 42px;/* float: left; */position: absolute;top: 104px;color: #ffffff;}.head3_div3_s {width: 234px;height: 42px;/* padding-left: 30px; */float: left;/* margin-top: 20px; */}.head3_div3_s>span {position: absolute;top: 10px;}.head3_div3_s:hover {background-color: #ff6700;}.head3_div3_1_2 {width: 992px;height: 400px;/* background-color: red; */background-color: #ffffff;/* position: relative; */position: absolute;right: -993px;top: -104px;/* top: -120px; */display: -webkit-flex;display: flex;-webkit-flex-wrap: wrap;align-content: flex-start;/* flex-grow: 1; */display: none;}.head3_div1_3:hover .head3_div3_1_2 {display: block;}.head3_div1_4 {width: 234px;height: 42px;/* float: left; */position: absolute;top: 146px;color: #ffffff;}.head3_div4_s {width: 234px;height: 42px;/* padding-left: 30px; */float: left;/* margin-top: 20px; */}.head3_div4_s>span {position: absolute;top: 10px;}.head3_div4_s:hover {background-color: #ff6700;}.head3_div4_1_2 {width: 741px;height: 400px;/* background-color: red; */background-color: #ffffff;/* position: relative; */position: absolute;right: -742px;top: -146px;/* top: -120px; */display: -webkit-flex;display: flex;-webkit-flex-wrap: wrap;align-content: flex-start;/* flex-grow: 1; */display: none;}.head3_div1_4:hover .head3_div4_1_2 {display: block;}.head3_div1_5 {width: 234px;height: 42px;/* float: left; */position: absolute;top: 188px;color: #ffffff;}.head3_div5_s {width: 234px;height: 42px;/* padding-left: 30px; */float: left;/* margin-top: 20px; */}.head3_div5_s>span {position: absolute;top: 10px;}.head3_div5_s:hover {background-color: #ff6700;}.head3_div5_1_2 {width: 992px;height: 400px;/* background-color: red; */background-color: #ffffff;/* position: relative; */position: absolute;right: -993px;top: -188px;/* top: -120px; */display: -webkit-flex;display: flex;-webkit-flex-wrap: wrap;align-content: flex-start;/* flex-grow: 1; */display: none;}.head3_div1_5:hover .head3_div5_1_2 {display: block;}.head3_div1_6 {width: 234px;height: 42px;/* float: left; */position: absolute;top: 230px;color: #ffffff;}.head3_div6_s {width: 234px;height: 42px;/* padding-left: 30px; */float: left;/* margin-top: 20px; */}.head3_div6_s>span {position: absolute;top: 10px;}.head3_div6_s:hover {background-color: #ff6700;}.head3_div6_1_2 {width: 992px;height: 400px;/* background-color: red; */background-color: #ffffff;/* position: relative; */position: absolute;right: -993px;top: -230px;/* top: -120px; */display: -webkit-flex;display: flex;-webkit-flex-wrap: wrap;align-content: flex-start;/* flex-grow: 1; */display: none;}.head3_div1_6:hover .head3_div6_1_2 {display: block;}.head3_div1_7 {width: 234px;height: 42px;/* float: left; */position: absolute;top: 272px;color: #ffffff;}.head3_div7_s {width: 234px;height: 42px;/* padding-left: 30px; */float: left;/* margin-top: 20px; */}.head3_div7_s>span {position: absolute;top: 10px;}.head3_div7_s:hover {background-color: #ff6700;}.head3_div7_1_2 {width: 741px;height: 400px;/* background-color: red; */background-color: #ffffff;/* position: relative; */position: absolute;right: -742px;top: -272px;/* top: -120px; */display: -webkit-flex;display: flex;-webkit-flex-wrap: wrap;align-content: flex-start;/* flex-grow: 1; */display: none;}.head3_div1_7:hover .head3_div7_1_2 {display: block;}.head3_div1_8 {width: 234px;height: 42px;/* float: left; */position: absolute;top: 314px;color: #ffffff;}.head3_div8_s {width: 234px;height: 42px;/* padding-left: 30px; */float: left;/* margin-top: 20px; */}.head3_div8_s>span {position: absolute;top: 10px;}.head3_div8_s:hover {background-color: #ff6700;}.head3_div8_1_2 {width: 498px;height: 400px;/* background-color: red; */background-color: #ffffff;/* position: relative; */position: absolute;right: -499px;top: -314px;/* top: -120px; */display: -webkit-flex;display: flex;-webkit-flex-wrap: wrap;align-content: flex-start;/* flex-grow: 1; */display: none;}.head3_div1_8:hover .head3_div8_1_2 {display: block;}.head3_div1_9 {width: 234px;height: 42px;/* float: left; */position: absolute;top: 356px;color: #ffffff;}.head3_div9_s {width: 234px;height: 42px;/* padding-left: 30px; */float: left;/* margin-top: 20px; */}.head3_div9_s>span {position: absolute;top: 10px;}.head3_div9_s:hover {background-color: #ff6700;}.head3_div9_1_2 {width: 741px;height: 400px;/* background-color: red; */background-color: #ffffff;/* position: relative; */position: absolute;right: -742px;top: -356px;/* top: -120px; */display: -webkit-flex;display: flex;-webkit-flex-wrap: wrap;align-content: flex-start;/* flex-grow: 1; */display: none;}.head3_div1_9:hover .head3_div9_1_2 {display: block;}.head3_div1_10 {width: 234px;height: 42px;}

四 、总结收获

  1. 毕竟第一次做,代码写的可能比较乱,命名可能也不是太规范,以后多加改正。
  2. 基本还原了原网页,并且只用到了CSS3和HTML5。

五 、完整版源码+图片素材

链接:https://pan.baidu.com/s/1538stsXWaPShaW6OGJM4Wg?pwd=0720
提取码:0720

大家有任何问题 都可以在评论区指出,谢谢哟!


http://www.ppmy.cn/news/313219.html

相关文章

小米手机相册选择并裁剪图片

/*** 裁剪原始的图片*/ public static final int PHOTOZOOM 2; // 缩放 public static final int PHOTORESOULT 3;// 结果 Uri mUritempFile; PermissionYes(200) //申请权限成功打开相册 private void getMultiYes( NonNull List<String> grantedPermissions) …

小米3一键调整分区+刷机教程

1什么是刷机2调整分区步骤 下载好第三方TWRP的recovery刷入twrp recovery进入recovery模式 3刷机教程 下载刷机包进入Fastboot模式进行刷机开始启动完成刷机 注意事项 【1】什么是刷机&#xff1f; 刷机,指的是手机方面的专业术语&#xff0c;是指通过一定的方法更改或替换手机…

php 小米路由器_小米路由3 原厂固件OPKG安装 nginx+php+mysql 搭建WEB环境 芒果云等...

本帖最后由 crosscc 于 2017-9-2 16:17 编辑 自己路由器是小米路由3,由于自带的APP和和迅雷远程下载,并且可以安装misstar tool(里面有KP SS webshell KMS aria2 远程管理等插件:http://bbs.xiaomi.cn/t-12975500) 所以不想刷第三方固件,百毒了小米搭建WEB环境教程,发现只…

用html和css仿作小米官网(静态)

目录 一&#xff1a;准备工作 二&#xff1a;头部导航栏部分 三&#xff1a;中间照片部分 四&#xff1a;尾部文字部分​​​​​​​ 准备工作&#xff1a; 首先我们需要从小米官网的网页源文件上下载需要的图片等素材&#xff0c;其次我们需要准备一个reset.css的通用的…

小米android点击,自动点击器小米版

为你带来一款自动点击屏幕的软件免root版&#xff0c;这款自动点击器7.0小米版支持安卓7.0及以上系统的安卓用户&#xff0c;自动化点击操作更方便。 软件介绍 自动点击器帮你自动点击屏幕&#xff0c;无需ROOT权限。可以方便添加点击位置&#xff0c;设置点击速度。 类似于按键…

android小米手机上传图片,android 解决小米手机上选择照片路径为null的问题

释放双眼&#xff0c;带上耳机&#xff0c;听听看~&#xff01; 之前做了一个获取相册选择图片的功能&#xff0c;后来测试人员在小米的手机 测试时出现崩溃现象。自己就在网上查找资料&#xff0c;发现是小米的获取图片路径的代码与其他的手机不一样&#xff0c;于是修改了代码…

小米8 se图片备份到电脑上

0、由于最近在抖音上面下了很多视频&#xff0c;所以想要备份下 1、第一步你要确定你的电脑和手机连的是同一个wifi网络&#xff1b; 2、然后点击小米手机自带的手机app&#xff0c;名字叫&#xff1a;文件管理 &#xff0c;选择分类–远程管理–如果wifi状态是黄色的下面就有…

小米4手机选择图库发送图片时崩溃

最近开发时遇见小米4&#xff0c;手机选择图库发送图片时崩溃的情况&#xff0c;查看logcat发现cusor查询时为null&#xff0c;查找资料解决此问题&#xff0c;在此记录下&#xff1a; if (data null) { return; } uri data.getData(); uri geturi(data);//解决方案 S…