<!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" />
<link rel="stylesheet" href="static/css/index.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-tixingtianchong"></a>
<a href="" class="img"><img src="static/images/user-pic.jpeg" alt="这是一个用户头像" /></a>
</div>
</div>
</div>
<div class="nav">
<div class="content">
<a href=""><img src="static/images/logo.png" alt="网站logo" /></a>
<div class="menu">
<a href="" class="active">首页</a>
<a href="">视频教程</a>
<a href="">学习路径</a>
<a href="">php培训</a>
<a href="">资源下载</a>
</div>
<div class="search">
<input type="search" name="" id="" placeholder="输入关键字" />
<span class="iconfont icon-fangdajing1"></span>
</div>
</div>
</div>
</header>
<main>
<div class="nav">
<div class="content">
<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="login">
<div class="touxiang">
<a href=""><img src="static/images/user-pic.jpeg" alt="" /> </a>
<p>我的名字</p>
<p>P豆20</p>
</div>
<button>我的学习</button>
</div>
<div class="question">
<div class="title">问答社区</div>
<div class="toutiao">
<p>头条</p>
<span>内容</span>
</div>
<div class="toutiao">
<p>福利</p>
<span>内容</span>
</div>
<div class="toutiao">
<p>新班</p>
<span>内容</span>
</div>
<div class="toutiao">
<p>招募</p>
<span>内容</span>
</div>
<div class="toutiao">
<p>公告</p>
<span>内容</span>
</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>9门课程</span>
</li>
<li onclick="">
<img src="static/images/ynxj.png" alt="" />
<a href="">独孤九剑</a>
<span>9门课程</span>
</li>
<li onclick="">
<img src="static/images/tlbb.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>
</ul>
</div>
<div class="bootom-right">
<div class="lianxi">
<a href=""><img src="static/images/phpkjkf.png" alt="" /></a>
<a href=""><img src="static/images/phpkjkf.png" alt="" /></a>
<p>微信</p>
<p>QQ</p>
</div>
</div>
</div>
</div>
</main>
</body>
</html>
@import url("icon-font.css");
* {
margin: 0;
padding: 0;
box-sizing: border-box;
text-decoration: none;
color: gray;
/* background-color: rgb(100, 100, 100); */
}
body {
background-color: rgba(200, 200, 200, 0.3);
}
body header .top {
height: 40px;
width: 100vw;
background-color: #343434;
}
body header .top .content {
width: 1200px;
display: grid;
grid-template-columns: 400px 100px;
grid-auto-rows: 40px;
place-content: space-between;
place-items: center start;
margin: auto;
}
body header .top .content .title {
font-size: large;
}
header .top .content .right .img {
text-align: center;
padding-top: 5px;
}
header .top .content .right {
display: grid;
grid-template-columns: repeat(2, 1fr);
place-items: center;
}
header .top .content .right .icon-tixingtianchong {
color: white;
font-size: larger;
}
body header .top .content .right img {
border-radius: 50%;
width: 70%;
}
header .nav {
width: 100vw;
height: 90px;
background-color: white;
box-shadow: 0 4px 10px rgba(200, 200, 200, 0.5);
}
header .nav .content {
width: 1200px;
display: grid;
grid-template-columns: 140px 1fr 180px;
grid-auto-rows: 90px;
gap: 10px;
place-items: center start;
margin: auto;
}
header .nav .content img {
width: 140px;
}
header .nav .content .menu + .search {
display: flex;
}
header .nav .content .menu a {
margin: 10px;
font-size: large;
}
header .nav .content .search input[type="search"] {
width: 200px;
height: 35px;
border: none;
/* 轮廓线 */
outline: none;
border-radius: 20px;
background-color: #eee;
}
header .nav .content .search .iconfont {
position: relative;
font-size: 20px;
top: 5px;
left: -40px;
}
main .nav {
width: 100vw;
height: 480px;
}
main .nav .content {
width: 1200px;
display: grid;
margin: 30px auto;
grid-template-columns: 160px 810px 190px;
grid-template-rows: 400px 80px;
gap: 20px;
place-content: center;
place-content: space-between;
}
main .nav .content .left {
width: 160px;
background-color: white;
border-radius: 20px;
display: flex;
flex-direction: column;
}
main .nav .content .right {
width: 190px;
background-color: white;
border-radius: 20px;
}
main .right .login {
display: grid;
grid-template-rows: 80px 40px;
grid-template-columns: 160px;
place-content: center;
}
main .right .login .touxiang {
width: 150px;
display: grid;
grid-template-columns: repeat(2, 70px);
grid-template-rows: repeat(2, 40px);
/* place-items: end end; */
}
.login .touxiang a {
margin: auto;
place-self: center;
grid-row: 1 / 3;
}
.login .touxiang a img {
margin-left: 10px;
width: 70%;
border-radius: 50%;
}
.login .touxiang p:first-of-type {
color: black;
font-weight: bold;
font-size: 14 px;
place-self: end start;
}
.login button {
border-style: none;
width: 120px;
height: 30px;
background-color: red;
color: white;
border-radius: 40px;
place-self: center;
}
.right .question {
width: 150px;
display: grid;
grid-template-rows: repeat(6, 30px);
margin-left: 20px;
margin-top: 20px;
}
.right .question .toutiao {
width: 140px;
display: grid;
grid-template-columns: 60px 1fr;
}
.right .question .toutiao {
color: black;
}
main .nav .content .left a {
margin: 10px;
}
main .nav .content .slider img {
border-radius: 20px;
}
main .nav .content .bottom-left {
grid-column: 1 / span 2;
display: grid;
grid-template-columns: 100px 1fr;
background-color: white;
border-radius: 20px;
/* place-content: space-between; */
place-content: center;
place-items: center;
}
main .nav .content .bottom-left ul {
width: 810px;
display: grid;
grid-template-columns: repeat(6, 100px);
place-content: space-between;
place-items: center;
}
/* main .nav .content .bottom-left ul li {
margin: 10px;
} */
main .nav .content .bottom-left ul li img {
width: 30px;
}
main .nav .content .bottom-left .title {
font-size: 12px;
}
main .nav .content .bottom-left ul li a {
font-size: 12px;
}
main .nav .content .bottom-left span {
font-size: 8px;
}
.bottom-left ul li {
display: grid;
grid-template-columns: 40px 1fr;
grid-template-rows: 20px 20px;
place-items: center start;
}
.bottom-left ul li img {
grid-row: 1 / span2;
}
main .bootom-right {
background-color: white;
border-radius: 20px;
}
main .bootom-right .lianxi {
width: 190px;
display: grid;
grid-template-columns: 60px 60px;
grid-template-rows: 60px, 60px;
place-content: end center;
place-items: center;
margin-top: 10px;
}
main .bootom-right .lianxi img {
width: 40px;
border-radius: 50%;
border-top: 10px;
}