
批改狀態(tài):合格
老師批語:可以,輪播圖可以等后續(xù)JS完善
<body>
<!-- 頁眉 -->
<header>
<div class="top">
<div class="content">
<span>php中文網(wǎng)-程序員夢(mèng)開始的地方</span>
<div class="login">
<a href="" class="iconfont icon-tixingtianchong"></a>
<a><img src="static/images/user-pic.jpeg" alt="" /></a>
</div>
</div>
</div>
<div class="bottom">
<div class="content">
<a href="#"><img src="static/images/logo.png" alt="" /></a>
<nav class="navs">
<a href="#" class="item">首頁</a>
<a href="#" class="item">視頻教程</a>
<a href="#" class="item">學(xué)習(xí)路徑</a>
<a href="#" class="item">PHP培訓(xùn)</a>
<a href="#" class="item">資源下載</a>
<a href="#" class="item">技術(shù)文章</a>
<a href="#" class="item">社區(qū)</a>
<a href="#" class="item">APP下載</a>
</nav>
<div class="search">
<input type="search" placeholder="請(qǐng)輸入關(guān)鍵字" />
<span class="iconfont icon-fangdajing1"></span>
</div>
</div>
</div>
</header>
<!-- 主體內(nèi)容 -->
<main>
<div class="navs">
<div class="left">
<a href="">php開發(fā)</a>
<a href="">大前端</a>
<a href="">后端開發(fā)</a>
<a href="">數(shù)據(jù)庫</a>
<a href="">移動(dòng)端</a>
<a href="">運(yùn)維開發(fā)</a>
<a href="">UI設(shè)計(jì)</a>
<a href="">計(jì)算機(jī)基礎(chǔ)</a>
</div>
<div class="slider">
<a href=""><img src="static/images/slider.jpeg" alt="" /></a>
</div>
<div class="right">
<div class="userinfo">
<img
src="static/images/user-pic.jpeg" alt="" />
<a href="#">朱老師</a>
<span>p豆:1200</span>
<div class="btn">
<button>我的學(xué)習(xí)</button>
</div>
</div>
<ul class="derail">
<li onclick="">
<span>問答社區(qū)</span>
<a href="#"><span class="desc">答疑</span></a>
</li>
<li onclick="">
<span>頭條</span>
<a href="#"><span>vue發(fā)展情況</span></a>
</li>
<li onclick="">
<span>福利</span>
<a href="#"><span>限時(shí)折扣</span></a>
</li>
<li onclick="">
<span>新班</span>
<a href="#"><span>20期PHP線上班</span></a>
</li>
<li onclick="">
<span>招募</span>
<a href="#"><span>課程合作計(jì)劃</span></a>
</li>
<li onclick="">
<span>公告</span>
<a href="#"><span>App上線啦</span></a>
</li>
</ul>
</div>
<div class="bottom-left">
<div class="desc">
<div class="title">學(xué)習(xí)路徑</div>
<span>全部7個(gè)></span>
</div>
<ul class="detail">
<li onclick="">
<img src="static/images/dgjj.png" alt="" />
<a href="">獨(dú)孤九賤</a>
<span>9門課程</span>
</li>
<li onclick="">
<img src="static/images/ynxj.png" alt="" />
<a href="">獨(dú)孤九賤</a>
<span>9門課程</span>
</li>
<li onclick="">
<img src="static/images/tlbb.png" alt="" />
<a href="">獨(dú)孤九賤</a>
<span>9門課程</span>
</li>
<li onclick="">
<img src="static/images/phpkjkf.png" alt="" />
<a href="">獨(dú)孤九賤</a>
<span>9門課程</span>
</li>
<li onclick="">
<img src="static/images/phpksrm.png" alt="" />
<a href="">獨(dú)孤九賤</a>
<span>9門課程</span>
</li>
</ul>
</div>
<div class="bottom-right">
<div class="weixin">
<span class="iconfont icon-weixin1"></span>
<span>官方公眾號(hào)</span>
</div>
<div class="qq">
<span class="iconfont icon-QQ"></span>
<span>官方QQ群</span>
</div>
</div>
<div class="live">
<div class="top">
<span class="title">直播課</span>
<a href="" class="more">更多></a>
</div>
<div class="bottom">
<ul class="list">
<li class="item">
<img src="static/images/live/1.jpg" alt="" />
<a href="#">
公益直播:PHP入門到實(shí)戰(zhàn)--實(shí)現(xiàn)郵箱驗(yàn)證(隊(duì)列發(fā)送郵件)
</a>
<span class="sp1">精彩回放</span>
<span class="sp2">21215人觀看</span>
</li>
<li class="item">
<img src="static/images/live/2.jpg" alt="" />
<a href="#"> 第二期_大前端線上班 </a>
<span class="sp1">精彩回放</span>
<span class="sp2">21215人觀看</span>
</li>
<li class="item">
<img src="static/images/live/3.png" alt="" />
<a href="#"> 第二十期_前端開發(fā) </a>
<span class="sp1">精彩回放</span>
<span class="sp2">21215人觀看</span>
</li>
<li class="item"></li>
</ul>
</div>
</div>
</div>
</main>
<!-- 頁腳 -->
<footer></footer>
</body>
@import url(reset.css);
/* 頁眉 */
/* 頂部 */
body header .top {
width: 100vw;
height: 40px;
background-color: #343434;
}
body header .top .content {
width: 1200px;
height: 40px;
margin: 0 auto;
display: flex;
place-content: space-between;
place-items: center;
}
body header .top .content span {
width: 300px;
color: rgba(206, 205, 205, 1);
font-family: "微軟雅黑";
font-size: 14px;
}
body header .top .content .login {
width: 100px;
display: grid;
grid-template-columns: repeat(2, 1fr);
place-items: center;
}
body header .top .content .login .icon-tixingtianchong {
color: #eee;
font-size: larger;
}
body header .top .content .login img {
width: 50%;
border-radius: 50%;
}
/* 底部 */
body header .bottom {
width: 100vw;
height: 90px;
background-color: white;
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}
body header .bottom .content {
width: 1200px;
margin: 0 auto;
display: grid;
grid-template-columns: 140px 1fr 200px;
grid-auto-rows: 90px;
gap: 10px;
place-items: center start;
}
body header .bottom .content img {
width: 140px;
margin-top: 3px;
}
body header .bottom .content .navs {
display: flex;
margin-left: 40px;
}
body header .bottom .content .navs a {
padding: 0 10px;
font-size: larger;
}
body header .bottom .content .navs a:first-of-type,
body header .bottom .content .navs a:hover {
color: red;
font-weight: bold;
}
body header .bottom .content .search {
display: flex;
}
body header .bottom .content .search input[type="search"] {
border: none;
background-color: #eee;
width: 200px;
height: 36px;
border-radius: 20px;
padding-left: 10px;
outline: none;
}
body header .bottom .content .search .icon-fangdajing1 {
font-size: 22px;
left: -40px;
top: 5px;
color: rgb(168, 167, 167);
position: relative;
}
body header .bottom .content .search .icon-fangdajing1:hover {
color: red;
cursor: pointer;
}
body main .navs {
/* 2行3列 */
display: grid;
grid-template-rows: 400px 80px;
grid-template-columns: 160px 810px 190px;
gap: 20px;
place-content: center;
margin: 30px 0;
}
/* 統(tǒng)一樣式,完成后可看到基本框架 */
body main .navs > * {
background-color: #fff;
border-radius: 20px;
}
/* 底部左邊占2列 */
body main .navs .bottom-left {
grid-column: span 2;
}
/* 整體布局完成,剩下就是細(xì)節(jié)了 */
/* 上部左邊導(dǎo)航 */
body main .navs .left {
padding: 20px 0;
/* grid: 默認(rèn)每個(gè)項(xiàng)目都是"塊級(jí)", 垂直排列 */
/* flex: 默認(rèn)每個(gè)項(xiàng)目都是"行內(nèi)塊級(jí)", 水平排列 */
display: grid;
/* 當(dāng)前項(xiàng)目在每個(gè)網(wǎng)絡(luò)單元中, 垂直,水平均居中 */
/* place-items: 垂直方向 水平方向; */
place-items: center;
}
body main .navs .left a {
padding: 10px 20px;
}
body main .navs .left a:hover {
border-radius: 20px;
color: red;
background-color: rgb(250, 223, 227);
}
/* 輪播圖,單圖模擬 */
body main .navs .slider img {
width: 100%;
border-radius: 20px;
}
/* 底部左側(cè) */
body main .navs .bottom-left {
display: grid;
grid-template-columns: 100px 1fr;
}
body main .navs .bottom-left .desc {
padding: 16px 0;
display: grid;
place-items: center;
font-size: 14px;
}
body main .navs .bottom-left .desc span {
font-size: 12px;
color: #999;
}
body main .navs .bottom-left .detail {
display: flex;
place-items: center;
place-content: space-between;
padding: 20px;
}
body main .navs .bottom-left .detail li {
display: grid;
grid-template-columns: 36px 85px;
grid-template-columns: repeat(2, 36);
gap: 0 10px;
place-items: center start;
}
body main .navs .bottom-left .detail img {
width: 100%;
grid-row: span 2;
}
body main .navs .bottom-left .detail li a {
font-size: 14px;
}
body main .navs .bottom-left .detail li a:hover {
color: red;
}
body main .navs .bottom-left .detail li span {
font-size: 12px;
color: #999;
}
/* 用戶信息 */
body main .navs .right {
display: grid;
grid-template-rows: 140px 1fr;
place-items: center;
}
body main .navs .right .userinfo {
width: 100%;
display: grid;
grid-template-columns: 90px 100px;
grid-template-rows: 30px 30px 70px;
}
body main .navs .right .userinfo img {
grid-row: span 2;
border-radius: 40px;
place-self: center;
}
body main .navs .right .userinfo a {
place-self: center start;
}
body main .navs .right .userinfo span {
color: rgb(121, 120, 120);
font-size: 12px;
}
body main .navs .right .userinfo a:hover {
color: red;
}
body main .navs .right .userinfo a {
font-family: "微軟雅黑";
font-weight: bold;
font-size: 12px;
color: black;
}
body main .navs .right .userinfo .btn {
width: 100%;
height: 70px;
grid-column: span 2;
border-bottom: 1px solid rgba(146, 145, 145, 0.3);
}
body main .navs .right .userinfo .btn button {
border-radius: 40px;
width: 80%;
height: 30px;
margin-top: 15px;
border: none;
background-color: red;
font-weight: bold;
cursor: pointer;
margin-left: 10%;
color: #fff;
}
body main .navs .right .derail {
margin: auto;
font-size: 14px;
}
body main .navs .right .derail li {
display: grid;
grid-template-columns: 60px 100px;
grid-auto-rows: 30px;
}
body main .navs .right .derail li span {
place-self: center;
font-weight: bold;
}
body main .navs .right .derail li a span {
font-weight: lighter;
color: rgb(151, 150, 150);
}
body main .navs .right .derail li:first-of-type a span {
display: block;
width: 40px;
text-align: center;
background-color: red;
color: #fff;
margin-left: 10px;
}
body main .navs .right .derail li a {
place-self: center start;
}
/* 底部右邊 */
body main .navs .bottom-right {
display: flex;
place-content: space-around;
}
body main .navs .bottom-right .weixin,
body main .navs .bottom-right .qq {
display: grid;
place-items: center;
font-weight: bold;
}
body main .navs .bottom-right .weixin span:last-of-type,
body main .navs .bottom-right .qq span:last-of-type {
font-size: 12px;
place-self: start center;
}
body main .navs .bottom-right .weixin .icon-weixin1,
body main .navs .bottom-right .qq .icon-QQ {
display: inline-block;
font-size: 16px;
width: 30px;
height: 30px;
text-align: center;
line-height: 30px;
color: #fff;
background-color: #aaa;
border-radius: 30px;
}
/* 直播課板塊 */
body main .navs .live {
width: 1200px;
display: flex;
flex-flow: column nowrap;
background-color: rgb(243, 245, 247);
}
/* 頂部 */
body main .navs .live .top {
width: 100%;
height: 32px;
display: flex;
place-content: space-between;
place-items: center;
}
body main .navs .live .top .title {
font-size: 22px;
font-weight: bold;
color: #333333;
}
body main .navs .live .top .more {
margin-right: 5px;
font-size: 14px;
color: #999999;
}
/* 底部 */
body main .navs .live .bottom {
width: 100%;
margin-top: 10px;
}
body main .navs .live .bottom .list {
display: flex;
place-content: space-between;
}
body main .navs .live .bottom .list .item {
width: 280px;
height: 260px;
background-color: white;
border-radius: 10px;
display: grid;
grid-template-columns: 140px 140px;
grid-template-rows: 160px 50px 50px;
place-content: start center;
}
body main .navs .live .bottom .list img {
width: 280px;
height: 160px;
border-radius: 10px 10px 0 0;
grid-column: span 2;
}
body main .navs .live .bottom .list a {
width: 245px;
margin: auto;
grid-column: span 2;
color: #333333;
}
body main .navs .live .top .more:hover,
body main .navs .live .bottom .list a:hover{
color: red;
}
body main .navs .live .bottom .list .sp1 {
width: 120px;
height: 18px;
margin-left: 18px;
font-size: 14px;
place-self: center start;
}
body main .navs .live .bottom .list .sp2 {
width: 100px;
height: 18px;
font-size: 14px;
place-self: center end;
color: #aaa;
}
微信掃碼
關(guān)注PHP中文網(wǎng)服務(wù)號(hào)
QQ掃碼
加入技術(shù)交流群
Copyright 2014-2025 http://ipnx.cn/ All Rights Reserved | php.cn | 湘ICP備2023035733號(hào)