Correcting teacher:天蓬老师
Correction status:qualified
Teacher's comments:关于配色就是因人而异了, 这个真没法教了, 凭感觉吧
index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>1227作业——仿php中文网手机端首页</title>
<link rel="stylesheet" href="static/css/style.css">
<link rel="stylesheet" href="static/font/iconfont.css">
</head>
<body>
<!--顶部LOGO区-->
<div class="header">
<img src="static/images/user/user1.gif" alt="">
<img src="static/images/logo.png" alt="">
<i class="iconfont icon-youceyingyongheji"></i>
</div>
<!--banner 区域-->
<main>
<div class="banner">
<a href=""><img src="static/images/banner/6.png" alt=""></a>
</div>
<!-- 导航区-->
<div class="nav">
<a href="">
<img src="static/images/icon/html.png" alt="">
<span>HTML/CSS</span>
</a>
<a href="">
<img src="static/images/icon/JavaScript.png" alt="">
<span>JavaScript</span>
</a>
<a href="">
<img src="static/images/icon/code.png" alt="">
<span>服务端</span>
</a>
<a href="">
<img src="static/images/icon/sql.png" alt="">
<span>数据库</span>
</a>
<a href="">
<img src="static/images/icon/app.png" alt="">
<span>移动端</span>
</a>
<a href="">
<img src="static/images/icon/manual.png" alt="">
<span>手册</span>
</a>
<a href="">
<img src="static/images/icon/tool2.png" alt="">
<span>工具</span>
</a>
<a href="">
<img src="static/images/icon/live.png" alt="">
<span>直播</span>
</a>
</div>
<!-- 推荐课程-->
<article class="recommend">
<h3>推荐课程</h3>
<section>
<a href=""><img src="static/images/reco/reco_1.jpg" alt=""></a>
<a href=""><img src="static/images/reco/reco_2.jpg" alt=""></a>
</section>
<section>
<ul>
<li>
<a href=""><img src="static/images/reco/reco_3.jpg" alt=""></a>
<div>
<a href="">CI框架30分钟极速入门</a>
<span><i>中级</i>55667播放</span>
</div>
</li>
<li>
<a href=""><img src="static/images/reco/reco_4.jpg" alt=""></a>
<div>
<a href="">2018前端入门_HTML5</a>
<span><i>初级</i>975667播放</span>
</div>
</li>
</ul>
</section>
</article>
<article class="la-up">
<h3>最新更新</h3>
<ul>
<li>
<a href=""><img src="static/images/laup/laup_1.jpg" alt=""></a>
<div>
<a href="">2019python自学视频</a>
<span>本课程适合想从零开始学习 Python 编程语言的开发人员。由浅入深的带你进入python世界,自学python的一份好课程,兄弟连课程</span>
<span><i>初级</i>5667播放</span>
</div>
</li>
<li>
<a href=""><img src="static/images/laup/laup_2.png" alt=""></a>
<div>
<a href="">PHP开发免费公益直播课</a>
<span>主讲:php中文网-朱老师( Peter Zhu)时间:2019.10.17 晚 20:00-22:00主题:如何高效的学习一门新技术?具体内容:1. 2020了, 还有哪些值得学习的新技术? 2.如何高效的学习前端开发? 3.如果高效的学习PHP开发?4.phpStudy V8 新功能介绍与演示 5.小皮面板功能介绍</span>
<span><i>初级</i>55667播放</span>
</div>
</li>
<li>
<a href=""><img src="static/images/laup/laup_3.jpg" alt=""></a>
<div>
<a href="">从零开始到WEB响应式布局</a>
<span>重点介绍了HTML、CSS、web布局前端核心技术,通过视频讲解,了解可以利用HTML+CSS做什么,有相关工具、后端语言,逻辑思维训练等知识点</span>
<span><i>初级</i>55667播放</span>
</div>
</li>
<li>
<a href=""><img src="static/images/laup/laup_4.png" alt=""></a>
<div>
<a href="">PHP文件基础操作</a>
<span>好多同学在PHP基础的时候对PHP文件的操作了解的不够多,本节课就带着大家来学习PHP文件的基础操作,PHP操作文件主要用到的就是PHP文件相关的函数,那么我们主要讲的也就是PHP文件相关的各种函数,相信本节课程会让你对PHP更感兴趣哦!</span>
<span><i>中级</i>55667播放</span>
</div>
</li>
<li>
<a href=""><img src="static/images/laup/laup_5.jpg" alt=""></a>
<div>
<a href=""><span>memcache基础课程</span></a>
<span>本课程带你从零认识memcache,让你在一小时左右轻松掌握memcache在windows和linux上的安装,基本命令的使用以及与php集成、thinkphp5中使用memcache做为缓存系统等技术。</span>
<span><i>初级</i>55667播放</span>
</div>
</li>
<li>
<a href=""><img src="static/images/laup/laup_6.png" alt=""></a>
<div>
<a href=""><span>微信小程序--企业微网站</span></a>
<span>1,介绍小程序、开发者工具2,介绍小程序文档3,微官网项目4,首页、产品、产品详情、新闻、新闻详情、关于我们</span>
<span><i>初级</i>55667播放</span>
</div>
</li>
</ul>
</article>
<article class="new-page">
<h3>最新文章</h3>
<ul>
<li>
<div>
<a href="">java程序怎么生成exe</a>
<span>发布时间:2019-12-28</span>
</div>
<a href=""><img src="static/images/newpage/np_1.jpg" alt=""></a>
</li>
<li>
<div>
<a href="">java程序怎么生成exe</a>
<span>发布时间:2019-12-28</span>
</div>
<a><img src="static/images/newpage/np_2.jpg" alt=""></a>
</li>
<li>
<div>
<a href="">WordPress分类与标签等存档页怎么实现置顶</a>
<span>发布时间:2019-12-28</span>
</div>
<a href=""><img src="static/images/newpage/np_3.jpg" alt=""></a>
</li>
<li>
<div>
<a href="">golang的hashmap怎么扩容</a>
<span>发布时间:2019-12-28</span>
</div>
<a href=""><img src="static/images/newpage/np_4.jpg" alt=""></a>
</li>
<li>
<div>
<a href="">Wordpress如何切换和管理网站外观</a>
<span>发布时间:2019-12-28</span>
</div>
<a href=""><img src="static/images/newpage/np_5.jpg" alt=""></a>
</li>
<li>
<div>
<a href="">wordpress怎么调用特定文章列表</a>
<span>发布时间:2019-12-28</span>
</div>
<a href=""><img src="static/images/newpage/np_1.jpg" alt=""></a>
</li>
</ul>
<a href="">更多内容</a>
</article>
<article class="new-blog">
<h3>最新文章</h3>
<ul>
<li>
<a href=""><span>composer安装laravel,nginx服务器路配置解决404问题,创建简单的控制器</span></a>
<span>2019-12-28</span>
</li>
<li>
<a href=""><span>2019-12-23 flex容器的6个属性练习总结-PHP培训十期线上班</span></a>
<span>2019-12-28</span>
</li>
<li>
<a href=""><span>转载《PHP安全之道》学习笔记1:PHP项目安全设置</span></a>
<span>2019-12-28</span>
</li>
<li>
<a href=""><span>关于双列排版自适应问题:(左侧固定,右侧自适应)成功,(右侧固定,左侧自适应)</span></a>
<span>2019-12-28</span>
</li>
</ul>
<a href="">更多内容</a>
</article>
<article class="new-qa">
<h3>最新文章</h3>
<ul>
<li>
<a href=""><span>怎么没提示添加成功还是添加失败呀</span></a>
<span>2019-12-28</span>
</li>
<li>
<a href=""> <span>我写的代码跟您的一样 在浏览器打开的时候为什么是乱码呢</span></a>
<span>2019-12-28</span>
</li>
<li>
<a href=""> <span>thinkphp3.2.3路径问题</span></a>
<span>2019-12-28</span>
</li>
<li>
<a href=""> <span>什么是开发工具</span></a>
<span>2019-12-28</span>
</li>
<li>
<a href=""> <span>怎么能学好PHP</span></a>
<span>2019-12-28</span>
</li>
</ul>
<a href="">更多内容</a>
</article>
</main>
<footer>
<a href=""><i class="iconfont icon-shouye"></i>首页</a>
<a href=""><i class="iconfont icon-shipin"></i>视频</a>
<a href=""><i class="iconfont icon-kaifazhezhongxingonggongAPI"></i>社区</a>
<a href=""><i class="iconfont icon-wode"></i>我的</a>
</footer>
</body>
</html>
style.css
/*页面元素初始化*/
*{
margin: 0;
padding: 0;
}
body{
font-size: 13px;
color: #888888;
background-color: #EDEFF0;
display: flex;
flex-direction: column;
min-width: 360px;
max-width: 768px;
margin: 0 auto;
overflow-x: hidden;
-webkit-column-rule-color: transparent;
}
a{
text-decoration: none;
color: #404040;
font-size: 13px;
}
li{
list-style: none;
}
/*header区*/
.header {
width: 100%;
max-width: 768px;
min-width: 360px;
height: 45px;
background-color: #2d353c;
display: flex;
justify-content: space-between;
align-items: center;
position: fixed;
top: 0;
}
.header > img:first-of-type{
height: 24px;
width: 24px;
border-radius: 12px;
margin-left: 5px;
box-sizing: border-box;
}
.header > img:last-of-type{
height:40px;
}
.header > i{
width:24px;
height: 24px;
color: white;
}
/*导航区*/
body > main {
flex-grow: 1;
display: flex;
flex-direction: column;
overflow: hidden;
margin-top: 45px;
}
main > .banner {
width:100%;
}
main > .banner > a img {
width:100%;
height: auto;
}
main > .nav {
display: flex;
flex-flow: row wrap;
padding: 20px;
box-sizing: border-box;
background-color: white;
}
main > .nav > a{
width: 25%;
height: 75px;
display: flex;
flex-direction: column;
align-items: center;
margin-top: 5px;
}
main > .nav > a img {
width: 45px;
height: 45px;
margin-bottom: 5px;
}
/*推荐课程*/
main > .recommend {
margin-top: 30px;
padding: 0 10px;
display: flex;
flex-direction: column;
}
main > .recommend > h3 {
font-size: 18px;
font-weight: bold;
padding-bottom: 10px;
}
main > .recommend > div {
background-color: white;
padding: 10px;
box-sizing: border-box;
}
main > .recommend > section:first-of-type{
background: none;
width: 100%;
display: flex;
padding: 0;
justify-content: space-between;
}
main > .recommend > section:first-of-type a {
margin: 5px;
height: 100px;
}
main > .recommend > section:first-of-type a > img{
width: 100%;
height: 100px;
}
main > .recommend > section:last-of-type > ul {
display: flex;
flex-direction: column;
}
main > .recommend > section:last-of-type > ul > li {
display: flex;
margin: 5px;
background-color: white;
}
main > .recommend > section:last-of-type > ul > li > a {
width: 40%;
}
main > .recommend > section:last-of-type > ul > li > a img {
width: 100%;
height: 90px;
margin: 5px;
box-sizing: border-box;
}
main > .recommend > section:last-of-type > ul > li > div {
display: flex;
flex-direction: column;
justify-content: space-between;
padding: 10px;
box-sizing: border-box;
flex: 1;
}
main > .recommend > section:last-of-type > ul > li > div > a {
font-size: 16px;
font-weight: bold;
}
main > .recommend > section:last-of-type > ul > li > div > span {
display: flex;
justify-content: space-between;
}
main > .recommend > section:last-of-type > ul > li > div > span i {
background-color: #333333;
color: white;
font-style: normal;
border-radius: 10px;
padding: 0 5px;
box-sizing: border-box;
font-size: smaller;
}
/*最新更新*/
main > .la-up {
display: flex;
flex-direction: column;
padding: 10px;
}
main > .la-up h3 {
font-size: 18px;
font-weight: bold;
padding: 10px 0;
}
main > .la-up > ul {
display: flex;
flex-direction: column;
}
main > .la-up > ul > li {
display: flex;
margin: 5px;
background-color: white;
}
main > .la-up > ul > li > a {
width: 40%;
}
main > .la-up > ul > li > a > img {
width: 100%;
height: 90px;
padding: 5px;
box-sizing: border-box;
}
main > .la-up > ul > li > div {
display: flex;
flex-direction: column;
justify-content: space-between;
padding: 10px;
flex: 1;
width: 0;
}
main > .la-up > ul > li > div > a {
font-size: 16px;
font-weight: bold;
}
main > .la-up > ul > li > div > span:first-of-type {
width: 100%;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
main > .la-up > ul > li > div > span:last-of-type {
display: flex;
justify-content: space-between;
}
main > .la-up > ul > li > div > span:last-of-type i{
background-color: #333333;
color: white;
font-style: normal;
border-radius: 10px;
padding: 0 5px;
box-sizing: border-box;
font-size: smaller;
}
/*最新文章*/
main > .new-page {
display: flex;
flex-direction: column;
padding: 10px;
}
main > .new-page h3 {
font-size: 18px;
font-weight: bold;
padding: 10px 0;
}
main > .new-page > ul {
display: flex;
flex-direction: column;
}
main > .new-page > ul > li {
display: flex;
justify-content: space-between;
margin: 5px;
background-color: white;
border: 1px solid #eeeeee;
box-shadow: 0 2px 4px 0 #999999;
}
main > .new-page > ul > li > div {
display: flex;
padding: 10px;
flex-direction: column;
justify-content: space-between;
}
main > .new-page > ul > li > div > a{
font-size: 16px;
}
main > .new-page > ul > li > a {
width: 40%;
padding: 5px;
}
main > .new-page > ul > li > a img {
width: 100%;
height: 60px;
}
main > .new-page > a {
background-color: white;
line-height: 30px;
text-align: center;
margin: 10px 5px;
}
/*最新博文*/
main > .new-blog {
display: flex;
flex-direction: column;
padding: 10px;
}
main > .new-blog h3 {
font-size: 18px;
font-weight: bold;
padding: 10px 0;
}
main > .new-blog > ul {
display: flex;
flex-direction: column;
}
main > .new-blog > ul > li {
display: flex;
justify-content: space-between;
margin: 5px;
background-color: white;
padding: 10px;
border: 1px solid #eeeeee;
box-shadow: 0 2px 4px 0 #999999;
}
main > .new-blog > ul > li a {
width: 70%;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
main > .new-blog > a {
background-color: white;
line-height: 30px;
text-align: center;
margin: 10px 5px;
}
/*最新问答*/
main > .new-qa {
display: flex;
flex-direction: column;
padding: 10px;
margin-bottom: 50px;
}
main > .new-qa h3 {
font-size: 18px;
font-weight: bold;
padding: 10px 0;
}
main > .new-qa > ul {
display: flex;
flex-direction: column;
}
main > .new-qa > ul > li {
display: flex;
justify-content: space-between;
margin: 5px;
background-color: white;
padding: 10px;
border: 1px solid #eeeeee;
box-shadow: 0 2px 4px 0 #999999;
}
main > .new-qa > ul > li a {
width: 70%;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
main > .new-qa > a {
background-color: white;
line-height: 30px;
text-align: center;
margin: 10px 5px;
}
/*页底导航*/
footer {
width: 100%;
height: 40px;
max-width: 768px;
min-width: 360px;
position: fixed;
bottom: 0;
border-top: 1px solid #cccccc;
display: flex;
justify-content: space-evenly;
padding: 5px 0;
background-color: #EDEFF0;
}
footer > a {
display: flex;
text-align: center;
flex-direction: column;
justify-content: center;
}
div
,都把ul
、li
给忘记了;