Correcting teacher:PHPz
Correction status:qualified
Teacher's comments:
<!DOCTYPE html>
<html lang="en">
<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">
<title>仿php中文网</title>
<link rel="stylesheet" href="static/css/reset.css">
<link rel="stylesheet" href="static/css/hw.css">
</head>
<body>
<!-- 头部 -->
<div class="top">
<div class="content">
<div class="top-left top-left-icon"></div>
<div class="top-right">
<div class="top-right-icon"></div>
<img src="static/image/user.jpeg" alt="user img">
</div>
</div>
</div>
<!-- 导航栏 -->
<div class="nav">
<div class="content">
<div class="logo"></div>
<div class="nav-list">
<nav>
<a href="">首页</a>
<a href="">视频教程</a>
<a href="">学习路径</a>
<a href="">php培训</a>
<a href="">资源下载</a>
<a href="">技术文章</a>
<a href="">社区</a>
</nav>
</div>
<div class="search">
<input type="text" placeholder="输入关键词搜索">
<input type="submit" class="inputSearch">
</div>
</div>
</div>
<!-- 主体 -->
<main>
<div class="first-row">
<div class="mainContent">
<!-- 1 -->
<div class="class-list">
<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>
<!-- 2 -->
<div class="banner">
<a href="">
<img src="static/image/slider.jpeg" alt="" />
</a>
</div>
<!-- 3 -->
<div class="notice">
<div class="noticeTop">
<div class="userinfo">
<div class="userinfo-left">
<img src="static/image/user.jpeg" alt="">
</div>
<div class="userinfo-right">
<div>Blackeye</div>
<div>P豆 9999</div>
</div>
</div>
<div class="myinfo">
<button>我的学习</button>
</div>
</div>
<div class="noticeButtom">
<div><span>问答社区</span><a href="#" class="notice-first">答疑</a></div>
<div>
<span>头条</span>
<div class="roll">
<div class="animation">
<a href="/toutiao-490267.html" target="_blank">“程序员做饭指南”,GitHub热榜第一!</a>
<a href="/toutiao-490161.html" target="_blank">首个采用中文编写的操作系统出现了!</a>
<a href="/toutiao-489943.html" target="_blank">Web3现状如何?能否在政策助推下复刻互联网辉煌?</a>
<a href="/toutiao-489887.html" target="_blank">JetBrains和Gitlab均表明暂停在俄罗斯的业务,国内网友对此有何看法?</a>
<a href="/toutiao-489859.html" target="_blank">美国Figma封停大疆等被制裁中国公司账号,国内就没替代了?</a>
<a href="/toutiao-489822.html" target="_blank">程序员有多好?阿姨懂!</a>
</div>
</div>
</div>
<div><span>新课</span><a href="" class="asite">3.9号公益直播课</a></div>
<div><span>新班</span><a href="" class="asite">19期PHP直播班</a></div>
<div><span>招募</span><a href="" class="asite">课程合作计划</a></div>
<div><span>公告</span><a href="" class="asite">APP上线啦</a></div>
</div>
</div>
<!-- 4 -->
<div class="pathWay">
<div class="pathWay-left">
<div>学习路径</div>
<div>全部7个></div>
</div>
<div class="pathWay-right">
<div><a href=""><img src="static/image/dgjj.png" alt=""><span>独孤九剑<br><p>9门课程</p></span></a></div>
<div><a href=""><img src="static/image/dgjj.png" alt=""><span>独孤九剑<br><p>9门课程</p></span></a></div>
<div><a href=""><img src="static/image/dgjj.png" alt=""><span>独孤九剑<br><p>9门课程</p></span></a></div>
<div><a href=""><img src="static/image/dgjj.png" alt=""><span>独孤九剑<br><p>9门课程</p></span></a></div>
<div><a href=""><img src="static/image/dgjj.png" alt=""><span>独孤九剑<br><p>9门课程</p></span></a></div>
</div>
</div>
<!-- 5 -->
<div class="social">
<div class="WX-div">
<div class="WX"></div>
<a href="">官方公众号</a>
</div>
<div class="QQ-div">
<div class="QQ"></div>
<a href="">官方QQ群</a>
</div>
</div>
</div>
</div>
<div class="mainContent"></div>
<div class="mainContent"></div>
<div class="mainContent"></div>
<div class="mainContent"></div>
</main>
</body>
</html>
/* 统一居中样式 */
.content {
width: 1200px;
display: grid;
margin: auto;
}
/* 顶部细节 */
.top {
width: 100vw;
background-color: #343434;
}
/* 顶部grid样式 */
.top .content {
height: 40px;
grid-template-columns: 230px 75px;
grid-auto-flow: 40px;
place-content: space-between;
}
/* 顶部左侧精灵图 */
.top-left-icon {
width: 230px;
height: 16px;
background: url(../image/sprite.png) no-repeat 0px 0px;
margin: 13px 0px 0px 0px;
}
/* 顶部右边子grid */
.top-right {
display: grid;
grid-template-columns: 15px 30px;
place-content: space-between;
}
/* 顶部右侧精灵图 */
.top-right-icon {
width: 13px;
height: 14px;
background: url(../image/sprite.png) no-repeat 0px -105px;
margin: 17px 0px 0px 0px;
}
/* 顶部image位置 */
.top-right img {
width: 25px;
height: 25px;
border-radius: 50%;
margin-top: 7px;
border: 1px solid #343434;
margin-left: 30px;
}
/* 设置导航条默认属性 */
.nav {
width: 100vw;
background-color: #fff;
}
/* 设置导航条grid样式 */
.nav .content {
height: 90px;
grid-template-columns: 140px 825px 200px;
grid-auto-flow: 90px;
place-content: center;
gap: 0px 40px;
}
/* php中文网logo */
.nav .content .logo {
place-items: center;
width: 140px;
height: 34px;
background: url(../image/logo.png) no-repeat;
}
/* 设置导航条位置 */
.nav .content .nav-list nav {
margin-top: 13px;
}
/* 设置导航条文字大小 */
.nav .content .nav-list nav a {
margin-right: 10px;
font-size: 16px;
/* font-weight: bold; */
}
/* 设置导航条文字间距及字号 */
.nav .content .nav-list nav a {
padding: 5px;
margin-right: 10px;
font-size: 16px;
/* font-weight: bold; */
}
/* 设置首页和悬浮效果 */
.nav .content .nav-list nav a:first-of-type,
.nav .content .nav-list nav a:hover {
font-weight: bold;
color: red;
}
/* 设置搜索框位置 */
.nav .content .search {
margin-top: 10px;
}
/* 设置搜索框大小 */
.nav .content .search input {
width: 175px;
height: 36px;
border: none;
outline: none;
border-radius: 20px;
background-color: #f7f8fa;
color: #999;
font-size: 12px;
padding-left: 20px;
}
/* 设置搜索图标 */
.nav .content .search .inputSearch {
width: 17px;
height: 17px;
border: none;
background: url(../image/sprite.png) no-repeat -45px -25px;
position: relative;
left: -40px;
}
/* 设置搜索图标悬浮样式 */
.nav .content .search .inputSearch:hover {
cursor: pointer;
background: url(../image/sprite.png) no-repeat -70px -25px;
}
/* 设置主题框字号 */
main {
font-size: 14px;
}
/* 设置主内容区grid */
main .first-row .mainContent {
display: grid;
grid-template-columns: 160px 810px 190px;
grid-template-rows: 400px 80px;
gap: 20px;
place-content: center;
margin: 30px 0;
}
/* 设置填充背景 */
main .first-row > .mainContent > * {
background-color: #fff;
border-radius: 20px;
}
/* 设置左侧导航栏grid */
main .first-row .mainContent .class-list {
display: grid;
place-items: center;
padding: 20px 0;
}
/* 设置左侧导航栏内边距 */
main .first-row .mainContent .class-list a {
padding: 10px 20px;
border-radius: 20px;
}
/* 设置左侧导航栏悬浮状态 */
main .first-row .mainContent .class-list a:hover {
color: red;
background-color: rgb(250, 223, 227);
}
/* 设置图片圆角 */
main .first-row .mainContent .banner img {
border-radius: 20px;
}
/* 设置左下跨行 */
main .first-row .mainContent .pathWay {
grid-column: 1 / span 2;
}
/* 设置右下grid */
main .first-row .mainContent .social {
display: grid;
grid-template-columns: 60px 60px;
place-content: space-around;
font-size: 12px;
font-weight: bold;
}
/* 设置微信图标 */
main .first-row .mainContent .social .WX {
width: 30px;
height: 30px;
background: url(../image/sprite.png) no-repeat -40px -60px;
margin: auto;
}
/* 设置QQ图标 */
main .first-row .mainContent .social .QQ {
width: 30px;
height: 30px;
background: url(../image/sprite.png) no-repeat 0px -60px;
margin: auto;
}
/* 设置悬浮鼠标状态 */
main .first-row .mainContent .social div:hover {
cursor: pointer;
}
/* 设置右下悬浮状态 */
main .first-row .mainContent .social .WX-div > a:hover,
main .first-row .mainContent .social .QQ-div > a:hover {
color: red;
}
/* 右侧gird布局 */
main .first-row .mainContent .notice {
display: grid;
grid-template-rows: 140px 240px;
place-content: space-around;
/* grid-auto-flow: column; */
}
/* 右侧上半段grid布局 */
main .first-row .mainContent .notice .noticeTop {
display: grid;
grid-template-rows: 60px 34px;
}
/* 右侧上半段边界 */
.notice .noticeTop {
border-bottom: 1px solid #eee;
}
.notice .noticeTop .userinfo {
display: grid;
grid-template-columns: 40px 44px;
}
.notice .noticeTop .userinfo .userinfo-left img {
width: 40px;
height: 40px;
border-radius: 100px;
margin-top: 20px;
}
.notice .noticeTop .userinfo .userinfo-right {
margin-left: 20px;
width: 105px;
}
.notice .noticeTop .userinfo .userinfo-right div:first-of-type {
margin: 20px 0 0 0;
font-weight: bold;
}
.notice .noticeTop .userinfo .userinfo-right div:first-of-type:hover {
cursor: pointer;
color: red;
}
.notice .noticeTop .userinfo .userinfo-right div:last-of-type {
height: 16px;
overflow: hidden;
font-size: 12px;
color: #999;
margin-top: 8px;
}
.notice .noticeTop .myinfo button {
width: 150px;
height: 34px;
background: #f11717;
border-radius: 100px;
color: white;
margin-top: 20px;
outline: none;
border: none;
}
.notice .noticeTop .myinfo button:hover{
cursor: pointer;
background-color: rgb(255,31,31,0.75);
}
main .first-row .mainContent .notice .noticeButtom {
display: grid;
grid-template-rows: 18px 41px 18px 18px 18px 18px;
padding: 10px 0;
place-content: space-evenly;
}
main .first-row .mainContent .notice .noticeButtom div span {
color: #333;
}
/* 右侧答疑 */
.notice .noticeButtom .notice-first {
display: inline-block;
width: 31px;
height: 16px;
background: #ff583d;
border-radius: 2px;
font-size: 12px;
color: #fff;
line-height: 16px;
text-align: center;
margin-left: 20px;
}
/* 轮播图初始化 */
.notice .noticeButtom .roll {
width: 100px;
height: 41px;
margin-left: 50px;
overflow: hidden;
position: relative;
margin-top: -20px;
}
/* 右侧a标签 */
.notice .noticeButtom .roll a {
color: #b6b6b6;
}
/* 右侧a标签 */
.notice .noticeButtom .asite {
color: #b6b6b6;
margin-left: 20px;
}
/* 轮播图 */
@keyframes anis {
100% {
transform: translateY(-200px);
}
}
img {
position: absolute;
}
.animation {
animation: anis 10s linear infinite;
}
.animation:hover {
animation-play-state: paused;
}
.pathWay{
display: grid;
grid-template-columns: 100px 870px;
}
.pathWay{
gap: 20px;
}
.pathWay-left{
place-self: center;
}
.pathWay-left div:last-of-type{
font-size: 12px;
color: #999;
margin-top: 5px;
}
.pathWay-right{
display: grid;
grid-template-columns: repeat(5, 1fr);
margin-top: 20px;
}
.pathWay-right img{
width: 36px;
height: 36px;
border-radius: 2px;
}
.pathWay-right span{
margin-left: 45px;
}
.pathWay-right span>*{
margin-left: 45px;
}