<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<!-- 页面初始化css -->
<link rel="stylesheet" href="static/css/reset.css" />
<!-- 字体图标库 -->
<link
rel="stylesheet"
href="//at.alicdn.com/t/font_3269118_mgnsjoz5gtp.css"
/>
<!-- 头部样式 -->
<link rel="stylesheet" href="static/css/header.css" />
<link rel="stylesheet" href="static/css/main.css" />
<link
rel="stylesheet"
href="//at.alicdn.com/t/font_3288147_wz5ppbosode.css"
/>
<title>仿PHP中文网首页</title>
</head>
<body>
<!-- 页眉 -->
<header>
<!-- 顶部 -->
<div class="top">
<div class="content">
<div class="title">PHP中文网-程序员梦开始的地方!</div>
<div class="right">
<a href="" class="iconfont icon-tixing"></a>
<a href=""><img src="static/images/user-pic.jpeg" /></a>
</div>
</div>
</div>
<!-- 导航 -->
<div class="navs">
<div class="content">
<a href="" class="logo"><img src="static/images/logo.png" /></a>
<nav>
<a href="" class="active">首页</a>
<a href="">视频教程</a>
<a href="">学习路径</a>
<a href="">php培训</a>
<a href="">资源下载</a>
<a href="">技术文章</a>
<a href="">社区</a>
<a href="">APP下载</a>
<a href="">...</a>
</nav>
<div class="search">
<input type="search" placeholder="输入关键词搜索" />
<span class="iconfont icon-fangdajing fdj"></span>
</div>
</div>
</div>
</header>
<!-- 主体 -->
<main>
<div class="navs">
<!-- 2行3列 -->
<div class="left">
<a href="">php开发</a>
<a href="">大前端</a>
<a href="">后端开发</a>
<a href="">数据库</a>
<a href="">移动端</a>
<a href="">运维开发</a>
<a href="">UI设计</a>
<a href="">计算机基础</a>
</div>
<div class="slider">
<a href="">
<img src="static/images/slider.jpeg" alt="" />
</a>
</div>
<div class="right">
<div class="right-top">
<!-- 我的学习 -->
<a href=""><img src="static/images/user-pic.jpeg" /></a>
<div class="user">
<a href="">为梦兼程</a>
<br />
<dd>P豆 80.5</dd>
</div>
<a href="" class="study">我的学习</a>
</div>
<div class="right-news">
<div class="f1">
<span>问答社区</span>
<a href="">答疑</a>
</div>
<div class="f2">
<p>
<span>头条</span>
<a href="">中文编程出现了</a>
<!-- <marquee direction="up" style="float: right;">UP</marquee> -->
</p>
<p>
<span>新课</span>
<a href="">3.9号公益直播课</a>
</p>
<p>
<span>新班</span>
<a href="">19期PHP直播班</a>
</p>
<p>
<span>招募</span>
<a href="">课程合作计划</a>
</p>
<p>
<span>公告</span>
<a href="">APP上线啦</a>
</p>
</div>
</div>
</div>
<div class="bottom-left">
<!-- 学习路径 -->
<div class="desc">
<div class="title">学习路径</div>
<span>全部7个></span>
</div>
<ul class="detail">
<li onclick="">
<img src="static/images/dgjj.png" alt="" />
<a href="">独孤九剑</a>
<span>九门课程</span>
</li>
<li onclick="">
<img src="static/images//ynxj.png" alt="" />
<a href="">独孤九贱</a>
<span>9门课程</span>
</li>
<li onclick="">
<img src="static/images//phpkjkf.png" alt="" />
<a href="">独孤九贱</a>
<span>9门课程</span>
</li>
<li onclick="">
<img src="static/images//phpksrm.png" alt="" />
<a href="">趣味闯关</a>
<span>9门课程</span>
</li>
<li onclick="">
<img src="static/images//dgjj.png" alt="" />
<a href="">独孤九贱</a>
<span>9门课程</span>
</li>
</ul>
</div>
<div class="bottom-right">
<ul class="content">
<li>
<a href="">
<b class="iconfont icon-weixin-copy"></b>
<h2>官方公众号</h2>
</a>
</li>
<li>
<a href="">
<b class="iconfont icon-QQ-circle-fill"></b>
<h2>官方QQ群</h2>
</a>
</li>
</ul>
</div>
</div>
<div class="live-class">
<div class="title">
<h2>最新课程</h2>
<a href="">更多></a>
</div>
<ul class="list">
<li>
<a href=""><img src="static/images/liveclass1.png" alt="" /></a>
<dl>
<dt>
<i>初级</i
><a href="">前端基础HTML+CSS3从入门到精通(完整版)</a>
</dt>
<dd>
<p>1359次学习</p>
<a href=""><b class="iconfont icon-kongwujiaoxing"></b>收藏</a>
</dd>
</dl>
</li>
<li>
<a href=""><img src="static/images/liveclass1.png" alt="" /></a>
<dl>
<dt>
<i>初级</i
><a href="">前端基础HTML+CSS3从入门到精通(完整版)</a>
</dt>
<dd>
<p>1359次学习</p>
<a href=""><b class="iconfont icon-kongwujiaoxing"></b>收藏</a>
</dd>
</dl>
</li>
<li>
<a href=""><img src="static/images/liveclass1.png" alt="" /></a>
<dl>
<dt>
<i>初级</i
><a href="">前端基础HTML+CSS3从入门到精通(完整版)</a>
</dt>
<dd>
<p>1359次学习</p>
<a href=""><b class="iconfont icon-kongwujiaoxing"></b>收藏</a>
</dd>
</dl>
</li>
<li>
<a href=""><img src="static/images/liveclass1.png" alt="" /></a>
<dl>
<dt>
<i>初级</i
><a href="">前端基础HTML+CSS3从入门到精通(完整版)</a>
</dt>
<dd>
<p>1359次学习</p>
<a href=""><b class="iconfont icon-kongwujiaoxing"></b>收藏</a>
</dd>
</dl>
</li>
<li>
<a href=""><img src="static/images/liveclass1.png" alt="" /></a>
<dl>
<dt>
<i>初级</i
><a href="">前端基础HTML+CSS3从入门到精通(完整版)</a>
</dt>
<dd>
<p>1359次学习</p>
<a href=""><b class="iconfont icon-kongwujiaoxing"></b>收藏</a>
</dd>
</dl>
</li>
<li>
<a href=""><img src="static/images/liveclass1.png" alt="" /></a>
<dl>
<dt>
<i>初级</i
><a href="">前端基础HTML+CSS3从入门到精通(完整版)</a>
</dt>
<dd>
<p>1359次学习</p>
<a href=""><b class="iconfont icon-kongwujiaoxing"></b>收藏</a>
</dd>
</dl>
</li>
<li>
<a href=""><img src="static/images/liveclass1.png" alt="" /></a>
<dl>
<dt>
<i>初级</i
><a href="">前端基础HTML+CSS3从入门到精通(完整版)</a>
</dt>
<dd>
<p>1359次学习</p>
<a href=""><b class="iconfont icon-kongwujiaoxing"></b>收藏</a>
</dd>
</dl>
</li>
<li>
<a href=""><img src="static/images/liveclass1.png" alt="" /></a>
<dl>
<dt>
<i>初级</i
><a href="">前端基础HTML+CSS3从入门到精通(完整版)</a>
</dt>
<dd>
<p>1359次学习</p>
<a href=""><b class="iconfont icon-kongwujiaoxing"></b>收藏</a>
</dd>
</dl>
</li>
<li>
<a href=""><img src="static/images/liveclass1.png" alt="" /></a>
<dl>
<dt>
<i>初级</i
><a href="">前端基础HTML+CSS3从入门到精通(完整版)</a>
</dt>
<dd>
<p>1359次学习</p>
<a href=""><b class="iconfont icon-kongwujiaoxing"></b>收藏</a>
</dd>
</dl>
</li>
<li>
<a href=""><img src="static/images/liveclass1.png" alt="" /></a>
<dl>
<dt>
<i>初级</i
><a href="">前端基础HTML+CSS3从入门到精通(完整版)</a>
</dt>
<dd>
<p>1359次学习</p>
<a href=""><b class="iconfont icon-kongwujiaoxing"></b>收藏</a>
</dd>
</dl>
</li>
</ul>
</div>
</main>
</body>
</html>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
a {
text-decoration: none;
color: #555;
}
body {
background-color: rgb(243, 245, 247);
}
li {
list-style: none;
}
header .top {
width: 100vw;
height: 40px;
background-color: rgb(52, 52, 52);
color: aliceblue;
}
header .top .content img {
width: 50%;
/* 下面属性是正圆 */
border-radius: 50%;
}
header .top .content {
width: 1200px;
display: grid;
/* 两列:400px 和 100px */
grid-template-columns: 400px 100px;
/* 限制隐式网格的高度 */
grid-auto-rows: 40px;
/* 两端对齐 */
place-content: space-between;
/* 垂直居中 水平默认*/
place-items: center start;
/* 挤到两边 */
margin: auto;
}
header .top .content .right .iconfont {
color: aliceblue;
font-size: larger;
}
header .top .content .right {
display: grid;
/* 两列自适应 */
grid-template-columns: repeat(2, 1fr);
/* 垂直居中 水平默认*/
place-items: center center;
}
/* 导航部分 */
header .navs {
width: 100vw;
height: 90px;
background-color: #fff;
}
header .navs .content {
width: 1200px;
display: grid;
/* 三列:140px 1fr 200px */
grid-template-columns: 140px 1fr 200px;
/* 限制隐式网格的高度 */
grid-auto-rows: 90px;
/* 间隙10px */
gap: 10px;
/* 挤到两边 */
margin: auto;
/* 项目在单元格中垂直居中、水平靠右 */
place-items: center start;
}
header .navs .content img {
width: 100%;
}
/* 首页两个字样式 */
header .navs .content nav a.active,
header .navs .content nav a:hover {
color: red;
font-weight: bold;
}
header .navs .content .search {
display: flex;
}
header .navs .content nav a {
padding: 0 10px;
}
header .navs .content .search input[type="search"] {
width: 200px;
height: 36px;
border: none;
outline: none;
background-color: #f7f8fa;
/* 输入框圆角 */
border-radius: 13%;
padding-left: 10px;
}
header .navs .content .search .fdj {
font-size: 22px;
color: #ccc;
position: relative;
left: -40px;
top: 7px;
}
main {
font-size: 14px;
}
main .navs {
/* 2行3列 */
display: grid;
/* 3列 */
grid-template-columns: 160px 810px 190px;
/* 2行 */
grid-template-rows: 400px 80px;
/* 列间距 */
gap: 20px;
/* 内容水平和垂直全部居中 */
place-content: center;
margin: 30px;
}
main .navs > * {
background-color: #fff;
border-radius: 20px;
}
/* 底部左侧前两列合并 */
main .navs .bottom-left {
grid-column: span 2;
}
main .navs .slider img {
width: 100%;
border-radius: 20px;
}
main .navs .left {
display: grid;
place-items: center;
padding: 20px 0px;
}
main .navs .left a {
border-radius: 20px;
padding: 10px 20px;
}
main .navs .left a:hover {
color: red;
background-color: rgb(250, 223, 227);
}
/* 学习路径 */
main .navs .bottom-left {
display: grid;
grid-template-columns: 100px 1fr;
}
main .navs .bottom-left .desc {
display: grid;
place-content: center;
padding: 16px 0px;
}
main .navs .bottom-left .detail img {
width: 100%;
grid-row: span 2;
}
main .navs .bottom-left .detail {
/* flex横排 */
display: flex;
place-items: center;
place-content: space-between;
margin: 0px 15px;
}
main .navs .bottom-left .detail li {
display: grid;
grid-template-columns: 36px 85px;
gap: 0px 10px;
place-items: center start;
}
main .navs .bottom-left .detail li a {
font-size: 14px;
}
main .navs .bottom-left .detail li a:hover {
font-size: 14px;
color: red;
}
main .navs .bottom-left .detail li span {
font-size: 12px;
color: #999;
}
/* 右侧我的学习 */
main .navs .right {
display: grid;
grid-template-rows: 142px 1fr;
gap: 10px;
}
main .navs .right .right-top img {
width: 60%;
border-radius: 50%;
margin-left: 20px;
margin-top: 20px;
}
main .navs .right .right-top {
display: grid;
grid-template-rows: repeat(2, 1fr);
grid-template-columns: repeat(2, 1fr);
place-content: center;
place-items: center;
background-color: #fff;
border-radius: 10px;
}
/* 会员信息靠左垂直居中 */
main .navs .right .right-top .user {
place-self: center start;
padding: 10px 0;
}
main .navs .right .right-top .user a {
font-size: large;
font-weight: bold;
}
main .navs .right .right-top .user a:hover {
color: red;
}
main .navs .right .right-top dd {
font-size: 14px;
color: #d0d0df;
margin: 5px;
}
main .navs .right .right-top .study {
grid-column: span 2;
background-color: red;
color: #fff;
width: 150px;
height: 34px;
border-radius: 20px;
padding: 3px 0;
text-align: center;
font-size: large;
font-weight: bold;
}
main .navs .right .right-news {
display: grid;
grid-template-rows: 50px 1fr;
margin: 3px 20px;
}
main .navs .right .right-news f1 {
place-self: center start;
}
main .navs .right .right-news f1 span {
margin-left: 5px;
font-size: large;
}
main .navs .right .right-news .f1 a {
width: 31px;
height: 16px;
background-color: red;
color: #fff;
border-radius: 2px;
font-size: 12px;
line-height: 16px;
padding: 1px 3px;
}
main .navs .right .right-news .f2 {
display: grid;
place-items: center start;
}
main .navs .right .right-news .f2 a {
color: #999;
}
main .navs .right .right-news .f2 a:hover {
color: red;
}
/* 公众号部分 */
main .navs .bottom-right .content {
display: grid;
grid-template-columns: repeat(2, 1fr);
place-items: center;
place-content: space-between;
}
main .navs .bottom-right .content li {
width: 70px;
height: 59px;
text-align: center;
place-content: center;
place-items: center;
margin: 10px 0;
}
main .navs .bottom-right .content li a b {
font-size: 30px;
place-content: center;
}
main .navs .bottom-right .content li a h2 {
font-size: 14px;
font-weight: bold;
height: 16px;
line-height: 16px;
place-content: center;
}
main .navs .bottom-right .content li a h2:hover {
color: red;
}
/* 直播课 */
main .live-class {
width: 1200px;
margin: 30px 0;
margin: auto;
display: grid;
grid-template-rows: 32px 530px;
}
main .live-class .title {
display: grid;
grid-template-columns: 88px 78px;
grid-template-rows: 32px;
place-content: space-between;
place-items: center start;
}
main .live-class .title a {
padding: 10px 10px;
width: 78px;
height: 32px;
background: #f0f1f4;
color: #999999;
border-radius: 20px;
text-align: center;
}
/* 课程列表 */
main .live-class .list {
display: grid;
grid-template-columns: repeat(5, 1fr);
grid-template-rows: repeat(2, 1fr);
place-content: space-between;
gap: 10px;
margin-top: 30px;
}
main .live-class .list li {
display: grid;
background-color: #fff;
border-radius: 5px;
}
main .live-class .list li img {
width: 100%;
border-radius: 6px 6px 0px 0px;
}
main .live-class .list li dl dt {
margin-left: 10px;
}
main .live-class .list li dl dt i {
float: left;
width: 28px;
height: 16px;
background: #93999f;
line-height: 16px;
overflow: hidden;
text-align: center;
font-style: normal;
font-size: 11px;
color: #ffffff;
margin-right: 10px;
margin-top: 3px;
}
main .live-class .list li dl dd {
display: flex;
margin-top: 15px;
margin-left: 15px;
place-content: space-between;
color: #b7b7b7;
}
main .live-class .list li dl dd a {
color: #b7b7b7;
margin-right: 15px;
}
相关推荐
© 2020 asciim码
人生就是一场修行