Blogger Information
Blog 37
fans 0
comment 0
visits 14225
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
仿PHP中文网首页-部分
秋闲独醉
Original
451 people have browsed it

  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8" />
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  7. <link rel="stylesheet" href="static/css/index.css" />
  8. <title>模仿php中文网首页</title>
  9. </head>
  10. <body>
  11. <header>
  12. <div class="top">
  13. <div class="content">
  14. <div class="title">php中文网-程序员梦开始的地方!</div>
  15. <div class="right">
  16. <a href="" class="iconfont icon-tixingtianchong"></a>
  17. <a href="" class="img"><img src="static/images/user-pic.jpeg" alt="这是一个用户头像" /></a>
  18. </div>
  19. </div>
  20. </div>
  21. <div class="nav">
  22. <div class="content">
  23. <a href=""><img src="static/images/logo.png" alt="网站logo" /></a>
  24. <div class="menu">
  25. <a href="" class="active">首页</a>
  26. <a href="">视频教程</a>
  27. <a href="">学习路径</a>
  28. <a href="">php培训</a>
  29. <a href="">资源下载</a>
  30. </div>
  31. <div class="search">
  32. <input type="search" name="" id="" placeholder="输入关键字" />
  33. <span class="iconfont icon-fangdajing1"></span>
  34. </div>
  35. </div>
  36. </div>
  37. </header>
  38. <main>
  39. <div class="nav">
  40. <div class="content">
  41. <div class="left">
  42. <a href="">php开发</a>
  43. <a href="">大前端</a>
  44. <a href="">后端开发</a>
  45. <a href="">数据库</a>
  46. <a href="">移动端</a>
  47. <a href="">运维开发</a>
  48. <a href="">UI设计</a>
  49. <a href="">计算机基础</a>
  50. </div>
  51. <div class="slider">
  52. <a href=""><img src="static/images/slider.jpeg" alt="广告" /> </a>
  53. </div>
  54. <div class="right">
  55. <div class="login">
  56. <div class="touxiang">
  57. <a href=""><img src="static/images/user-pic.jpeg" alt="" /> </a>
  58. <p>我的名字</p>
  59. <p>P豆20</p>
  60. </div>
  61. <button>我的学习</button>
  62. </div>
  63. <div class="question">
  64. <div class="title">问答社区</div>
  65. <div class="toutiao">
  66. <p>头条</p>
  67. <span>内容</span>
  68. </div>
  69. <div class="toutiao">
  70. <p>福利</p>
  71. <span>内容</span>
  72. </div>
  73. <div class="toutiao">
  74. <p>新班</p>
  75. <span>内容</span>
  76. </div>
  77. <div class="toutiao">
  78. <p>招募</p>
  79. <span>内容</span>
  80. </div>
  81. <div class="toutiao">
  82. <p>公告</p>
  83. <span>内容</span>
  84. </div>
  85. </div>
  86. </div>
  87. <div class="bottom-left">
  88. <div class="desc">
  89. <div class="title">学习路径</div>
  90. <span>全部7个&gt;</span>
  91. </div>
  92. <ul class="detail">
  93. <li onclick="">
  94. <img src="static/images/dgjj.png" alt="" />
  95. <a href="">独孤九剑</a>
  96. <span>9门课程</span>
  97. </li>
  98. <li onclick="">
  99. <img src="static/images/ynxj.png" alt="" />
  100. <a href="">独孤九剑</a>
  101. <span>9门课程</span>
  102. </li>
  103. <li onclick="">
  104. <img src="static/images/tlbb.png" alt="" />
  105. <a href="">独孤九剑</a>
  106. <span>9门课程</span>
  107. </li>
  108. <li onclick="">
  109. <img src="static/images/phpkjkf.png" alt="" />
  110. <a href="">独孤九剑</a>
  111. <span>9门课程</span>
  112. </li>
  113. <li onclick="">
  114. <img src="static/images/phpksrm.png" alt="" />
  115. <a href="">独孤九剑</a>
  116. <span>9门课程</span>
  117. </li>
  118. </ul>
  119. </div>
  120. <div class="bootom-right">
  121. <div class="lianxi">
  122. <a href=""><img src="static/images/phpkjkf.png" alt="" /></a>
  123. <a href=""><img src="static/images/phpkjkf.png" alt="" /></a>
  124. <p>微信</p>
  125. <p>QQ</p>
  126. </div>
  127. </div>
  128. </div>
  129. </div>
  130. </main>
  131. </body>
  132. </html>
  1. @import url("icon-font.css");
  2. * {
  3. margin: 0;
  4. padding: 0;
  5. box-sizing: border-box;
  6. text-decoration: none;
  7. color: gray;
  8. /* background-color: rgb(100, 100, 100); */
  9. }
  10. body {
  11. background-color: rgba(200, 200, 200, 0.3);
  12. }
  13. body header .top {
  14. height: 40px;
  15. width: 100vw;
  16. background-color: #343434;
  17. }
  18. body header .top .content {
  19. width: 1200px;
  20. display: grid;
  21. grid-template-columns: 400px 100px;
  22. grid-auto-rows: 40px;
  23. place-content: space-between;
  24. place-items: center start;
  25. margin: auto;
  26. }
  27. body header .top .content .title {
  28. font-size: large;
  29. }
  30. header .top .content .right .img {
  31. text-align: center;
  32. padding-top: 5px;
  33. }
  34. header .top .content .right {
  35. display: grid;
  36. grid-template-columns: repeat(2, 1fr);
  37. place-items: center;
  38. }
  39. header .top .content .right .icon-tixingtianchong {
  40. color: white;
  41. font-size: larger;
  42. }
  43. body header .top .content .right img {
  44. border-radius: 50%;
  45. width: 70%;
  46. }
  47. header .nav {
  48. width: 100vw;
  49. height: 90px;
  50. background-color: white;
  51. box-shadow: 0 4px 10px rgba(200, 200, 200, 0.5);
  52. }
  53. header .nav .content {
  54. width: 1200px;
  55. display: grid;
  56. grid-template-columns: 140px 1fr 180px;
  57. grid-auto-rows: 90px;
  58. gap: 10px;
  59. place-items: center start;
  60. margin: auto;
  61. }
  62. header .nav .content img {
  63. width: 140px;
  64. }
  65. header .nav .content .menu + .search {
  66. display: flex;
  67. }
  68. header .nav .content .menu a {
  69. margin: 10px;
  70. font-size: large;
  71. }
  72. header .nav .content .search input[type="search"] {
  73. width: 200px;
  74. height: 35px;
  75. border: none;
  76. /* 轮廓线 */
  77. outline: none;
  78. border-radius: 20px;
  79. background-color: #eee;
  80. }
  81. header .nav .content .search .iconfont {
  82. position: relative;
  83. font-size: 20px;
  84. top: 5px;
  85. left: -40px;
  86. }
  87. main .nav {
  88. width: 100vw;
  89. height: 480px;
  90. }
  91. main .nav .content {
  92. width: 1200px;
  93. display: grid;
  94. margin: 30px auto;
  95. grid-template-columns: 160px 810px 190px;
  96. grid-template-rows: 400px 80px;
  97. gap: 20px;
  98. place-content: center;
  99. place-content: space-between;
  100. }
  101. main .nav .content .left {
  102. width: 160px;
  103. background-color: white;
  104. border-radius: 20px;
  105. display: flex;
  106. flex-direction: column;
  107. }
  108. main .nav .content .right {
  109. width: 190px;
  110. background-color: white;
  111. border-radius: 20px;
  112. }
  113. main .right .login {
  114. display: grid;
  115. grid-template-rows: 80px 40px;
  116. grid-template-columns: 160px;
  117. place-content: center;
  118. }
  119. main .right .login .touxiang {
  120. width: 150px;
  121. display: grid;
  122. grid-template-columns: repeat(2, 70px);
  123. grid-template-rows: repeat(2, 40px);
  124. /* place-items: end end; */
  125. }
  126. .login .touxiang a {
  127. margin: auto;
  128. place-self: center;
  129. grid-row: 1 / 3;
  130. }
  131. .login .touxiang a img {
  132. margin-left: 10px;
  133. width: 70%;
  134. border-radius: 50%;
  135. }
  136. .login .touxiang p:first-of-type {
  137. color: black;
  138. font-weight: bold;
  139. font-size: 14 px;
  140. place-self: end start;
  141. }
  142. .login button {
  143. border-style: none;
  144. width: 120px;
  145. height: 30px;
  146. background-color: red;
  147. color: white;
  148. border-radius: 40px;
  149. place-self: center;
  150. }
  151. .right .question {
  152. width: 150px;
  153. display: grid;
  154. grid-template-rows: repeat(6, 30px);
  155. margin-left: 20px;
  156. margin-top: 20px;
  157. }
  158. .right .question .toutiao {
  159. width: 140px;
  160. display: grid;
  161. grid-template-columns: 60px 1fr;
  162. }
  163. .right .question .toutiao {
  164. color: black;
  165. }
  166. main .nav .content .left a {
  167. margin: 10px;
  168. }
  169. main .nav .content .slider img {
  170. border-radius: 20px;
  171. }
  172. main .nav .content .bottom-left {
  173. grid-column: 1 / span 2;
  174. display: grid;
  175. grid-template-columns: 100px 1fr;
  176. background-color: white;
  177. border-radius: 20px;
  178. /* place-content: space-between; */
  179. place-content: center;
  180. place-items: center;
  181. }
  182. main .nav .content .bottom-left ul {
  183. width: 810px;
  184. display: grid;
  185. grid-template-columns: repeat(6, 100px);
  186. place-content: space-between;
  187. place-items: center;
  188. }
  189. /* main .nav .content .bottom-left ul li {
  190. margin: 10px;
  191. } */
  192. main .nav .content .bottom-left ul li img {
  193. width: 30px;
  194. }
  195. main .nav .content .bottom-left .title {
  196. font-size: 12px;
  197. }
  198. main .nav .content .bottom-left ul li a {
  199. font-size: 12px;
  200. }
  201. main .nav .content .bottom-left span {
  202. font-size: 8px;
  203. }
  204. .bottom-left ul li {
  205. display: grid;
  206. grid-template-columns: 40px 1fr;
  207. grid-template-rows: 20px 20px;
  208. place-items: center start;
  209. }
  210. .bottom-left ul li img {
  211. grid-row: 1 / span2;
  212. }
  213. main .bootom-right {
  214. background-color: white;
  215. border-radius: 20px;
  216. }
  217. main .bootom-right .lianxi {
  218. width: 190px;
  219. display: grid;
  220. grid-template-columns: 60px 60px;
  221. grid-template-rows: 60px, 60px;
  222. place-content: end center;
  223. place-items: center;
  224. margin-top: 10px;
  225. }
  226. main .bootom-right .lianxi img {
  227. width: 40px;
  228. border-radius: 50%;
  229. border-top: 10px;
  230. }
Correcting teacher:PHPzPHPz

Correction status:qualified

Teacher's comments:
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!