赞
踩
大家好,本篇文章分析一下 用HTML5+CSS3实现华为鸿蒙官网!
该网页结构相对简单,比较适合大家当个课程设计啥的!
大家如果正在面临课程设计的烦恼,那么恭喜大家遇见了我,因为我也是学生,我前段时间也正在饱受摧残,现在将我的作品展示给大家,大家如果有任何问题了,可以及时联系我,帮助大家!
因为篇幅受限,所有这里仅展示部分代码,完整代码在文章末尾
<div class="head1"> <div class="head1_1"> <a href="">注册</a> <a href="">登录</a> <a href="">简体中文</a> </div> </div> <div class="container"> <div class="con1"> <div class="a1"> <a href="#"><img src="imgs/harmonyOS_logo.png" alt="" style="float: left; height: 20px;width: 93px; margin-top: 35px;"></a> </div> <div class="a2"> <ul> <li><a href="#">开发</a></li> <li><a href="#">活动</a></li> <li><a href="#">资讯</a></li> <li><a href="#">生态合作</a></li> <li><a href="#">开发者社区</a></li> </ul> </div> <div class="a3"> <input type="search" placeholder="请输入关键词" style="float: right; height: 40px; width: 200px; border-radius: 20px; margin-top: 22px;"> </div> </div>
.head1 { /* width: 1518px; */ position: relative; width: 100%; height: 25px; background-color: #f5f5f5; } .head1_1 { width: 1395px; height: 25px; margin-left: 48px; margin-right: 48px; padding-left: 15px; padding-right: 15px; } .head1_1 a { text-decoration: none; float: right; color: #000; font-size: 12px; line-height: 25px; margin-left: 19px; } /* 中间 */ .container { width: 1518px; min-height: 2100px; /* background-color: red; */ position: relative; margin: 0 auto; } .con1 { width: 1360px; height: 81px; padding-left: 80px; padding-right: 80px; /* background-color: aqua; */ background-color: #fff; } .con1 .a2 ul li { float: left; margin-top: 30px; padding: 0 30px; } .con1 .a2 ul li a { color: #1E1911; font-size: 16px; } .con2 { width: 1520px; height: 640px; /* background-color: seagreen; */ } .head3_lunbo { width: 4560px; height: 640px; animation: text 10s infinite backwards; /*消除图片间隔*/ } .head3_lunbo img { width: 1520px; height: 640px; float: left; } @keyframes text { /*0%-20%是播放下一个图片,0%-10%是图片暂停的时间*/ 0%, 35% { margin-left: 0px; } 40%, 70% { margin-left: -1520px; } 75%, 100% { margin-left: -3040px; } } .con3 { width: 1520px; height: 560px; /* background-color: tomato; */ background-color: #fff; } .con4 { width: 1520px; height: 3022px; background-color: gold; } .con5 { width: 1520px; height: 940px; padding-bottom: 96px; /* background-color: purple; */ } .con5_1 { width: 1280px; height: 180px; padding-top: 120px; margin-left: 120px; margin-right: 120px; /* background-color: seagreen; */ } .con5_2 { width: 1280px; height: 640px; margin-left: 120px; margin-right: 120px; } .con5_2 img { width: 1280px; height: 640px; } .con6 { width: 1520px; height: 940px; padding-bottom: 96px; /* background-color: salmon; */ } .con7 { width: 1520px; height: 804px; /* background-color: aquamarine; */ } .con7_1 { width: 346px; height: 436px; padding-top: 48px; padding-bottom: 32px; padding-left: 32px; padding-right: 32px; margin-right: 16px; margin-bottom: 16px; float: left; background-color: #ffffff; display: inline-block; border-radius: 15px; } .con7_1 img { width: 220px; height: 220px; } .con7_1 h3 { width: 352px; height: 32px; margin-top: 16px; margin-bottom: 16px; letter-spacing: 0; color: #000000; font-size: 28px; line-height: 32px; font-weight: 500; } .con7_1 p { width: 352px; margin-bottom: 24px; font-size: 16px; line-height: 24px; letter-spacing: 0; color: rgba(0, 0, 0, 0.8); } .con7_1:hover { box-shadow: 4px 20px 40px 5px rgba(0, 0, 0, .1); } .end { /* width: 1518px; */ position: relative; width: 100%; height: 500px; /* background-color: pink; */ background-color: #F5F5F5; } .end .y1 { height: 500px; width: 1285px; /* background-color: pink; */ margin: 0 auto; } .end .y1 .y2 .y5 { float: left; height: 339px; width: 214px; /* background-color: pink; */ } .end .y1 .y2 .y6 { float: left; height: 339px; width: 214px; /* background-color: pink; */ } .end .y1 .y2 .y7 { float: left; height: 339px; width: 214px; /* background-color: pink; */ } .end .y1 .y2 .y8 { float: left; height: 339px; width: 214px; /* background-color: pink; */ } .end .y1 .y2 .y9 { float: left; height: 339px; width: 214px; /* background-color: pink; */ } .end .y1 .y2 .y10 { float: left; height: 339px; width: 214px; /* background-color: pink; */ } .end .y1 .y2 h4 { margin-top: 70px; margin-left: 30px; } .end .y1 .y2 ul { margin-left: 30px; } .end .y1 .y2 ul li { margin-top: 20px; } .end .y1 .y2 ul li a { color: #565956; font-size: 16px; } .end .y1 .y2 ul li a:hover { text-decoration: underline; } .end .y3 .y11 { float: left; height: 85px; width: 200px; /* background-color: pink; */ } .end .y3 .y12 { float: right; height: 85px; width: 200px; /* background-color: pink; */ } .end .y4 ul li { float: left; margin-top: 35px; } .end .y4 ul li a { font-size: 14px; text-decoration: none; color: #B0B1B0; } .end .y4 ul li a:hover { text-decoration: underline } .end .y1 .y2 html { overflow-x: hidden; } html { overflow-x: hidden; }
链接:https://pan.baidu.com/s/1k6llDi-DfxNsfmO5g_L6NQ?pwd=1215
提取码:1215
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。