ASCII码 ASCII码

仿PHP中文网首页

发布于:2022-03-29 11:17:35  栏目:技术文档

  1. <!DOCTYPE html>
  2. <html lang="zh-CN">
  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/reset.css" />
  8. <link rel="stylesheet" href="//at.alicdn.com/t/font_3269118_mgnsjoz5gtp.css" />
  9. <link rel="stylesheet" href="static/css/header.css" />
  10. <link rel="stylesheet" href="static/css/main-nav.css" />
  11. <link rel="stylesheet" href="//at.alicdn.com/t/font_3284190_7o8q270yfoo.css">
  12. <title>仿php.cn中文网首页差头部</title>
  13. </head>
  14. <body>
  15. <!-- 页眉 -->
  16. <header>
  17. <!-- 1 顶部 -->
  18. <div class="top">
  19. <div class="content">
  20. <div class="title">php中文网,程序员梦开始的地方!</div>
  21. <div class="right">
  22. <a href="" class="iconfont icon-tixing"></a>
  23. <a href=""><img src="static/images/user-pic.jpeg" alt="" /></a>
  24. </div>
  25. </div>
  26. </div>
  27. <!-- 2 导航 -->
  28. <div class="navs">
  29. <div class="content">
  30. <a href="" class="logo"><img src="static/images/logo.png" alt="" /></a>
  31. <nav>
  32. <a href="" class="active">首页</a>
  33. <a href="">视频教程</a>
  34. <a href="">学习路径</a>
  35. <a href="">php培训</a>
  36. <a href="">资源下载</a>
  37. </nav>
  38. <div class="search">
  39. <input type="search" placeholder="输入关键字搜索" />
  40. <span class="iconfont icon-fangdajing fdj"></span>
  41. </div>
  42. </div>
  43. </div>
  44. </header>
  45. <!-- 主体 -->
  46. <main>
  47. <div class="navs">
  48. <!-- 2行3列 -->
  49. <div class="left">
  50. <a href="">php开发</a>
  51. <a href="">大前端</a>
  52. <a href="">后端开发</a>
  53. <a href="">数据库</a>
  54. <a href="">移动端</a>
  55. <a href="">运维开发</a>
  56. <a href="">UI设计</a>
  57. <a href="">计算机基础</a>
  58. </div>
  59. <div class="slider">
  60. <a href="">
  61. <img src="static/images/slider.jpeg" alt="" />
  62. </a>
  63. </div>
  64. <div class="right">
  65. <div class="right-content">
  66. <div class="right-content-shang">
  67. <div class="right-content-shang1"> <span>
  68. <a href=""><img src="static/images/hua.jpg" alt=""></a>
  69. </span>
  70. <dl>
  71. <dt><a href="">愿情的博客</a></dt>
  72. <dd>p豆:32</dd>
  73. </dl>
  74. </div>
  75. <div class="right-content-shang2">
  76. <a href="">我的学习</a>
  77. </div>
  78. </div>
  79. <div class="right-content-xia">
  80. <div class="f1">
  81. <span>问答社区</span>
  82. <a href="" >答疑</a>
  83. </div>
  84. <div class="f2">
  85. <p>
  86. <span>头条</span>
  87. <a href="">程序员有多好</a>
  88. <!-- <marquee direction="up" style="float: right;">UP</marquee> -->
  89. </p>
  90. <p>
  91. <span>新课</span>
  92. <a href="">3.9号公益直播课</a>
  93. </p>
  94. <p>
  95. <span>新班</span>
  96. <a href="">19期PHP直播班</a>
  97. </p>
  98. <p>
  99. <span>招募</span>
  100. <a href="">课程合作计划</a>
  101. </p>
  102. <p>
  103. <span>公告</span>
  104. <a href="">APP上线啦</a>
  105. </p>
  106. </div>
  107. </div>
  108. </div>
  109. </div>
  110. <div class="bottom-left">
  111. <!-- 学习路径 -->
  112. <div class="desc">
  113. <div class="title">学习路径</div>
  114. <span>全部7个&gt;</span>
  115. </div>
  116. <ul class="detail">
  117. <li onclick="">
  118. <img src="static/images//dgjj.png" alt="" />
  119. <a href="">独孤九贱</a>
  120. <span>9门课程</span>
  121. </li>
  122. <li onclick="">
  123. <img src="static/images//ynxj.png" alt="" />
  124. <a href="">独孤九贱</a>
  125. <span>9门课程</span>
  126. </li>
  127. <li onclick="">
  128. <img src="static/images//phpkjkf.png" alt="" />
  129. <a href="">独孤九贱</a>
  130. <span>9门课程</span>
  131. </li>
  132. <li onclick="">
  133. <img src="static/images//phpksrm.png" alt="" />
  134. <a href="">趣味闯关</a>
  135. <span>9门课程</span>
  136. </li>
  137. <li onclick="">
  138. <img src="static/images//dgjj.png" alt="" />
  139. <a href="">独孤九贱</a>
  140. <span>9门课程</span>
  141. </li>
  142. </ul>
  143. </div>
  144. <div class="bottom-right">
  145. <ul class="content">
  146. <li>
  147. <a href="">
  148. <b class="iconfont icon-weixin"></b>
  149. <h2>官方公众号</h2>
  150. </a>
  151. </li>
  152. <li>
  153. <a href="">
  154. <b class="iconfont icon-QQ-circle-fill"></b>
  155. <h2>官方QQ群</h2>
  156. </a>
  157. </li>
  158. </ul>
  159. </div>
  160. </div>
  161. </div>
  162. </div>
  163. </main>
  164. </body>
  165. </html>
  1. main {
  2. font-size: 14px;
  3. }
  4. main .navs {
  5. /* 2行3列 */
  6. display: grid;
  7. grid-template-columns: 160px 810px 190px;
  8. grid-template-rows: 400px 80px;
  9. gap: 20px;
  10. place-content: center;
  11. margin: 30px 0;
  12. }
  13. main .navs>* {
  14. background-color: #fff;
  15. border-radius: 20px;
  16. /* outline: 1px solid red; */
  17. }
  18. /* 底部左侧占2列 */
  19. main .navs .bottom-left {
  20. grid-column: span 2;
  21. }
  22. main .navs .slider img {
  23. width: 100%;
  24. border-radius: 20px;
  25. }
  26. /* 左侧导航 */
  27. main .navs .left {
  28. display: grid;
  29. place-items: center;
  30. padding: 20px 0;
  31. }
  32. main .navs .left a:hover {
  33. color: red;
  34. background-color: rgb(250, 223, 227);
  35. }
  36. main .navs .left a {
  37. border-radius: 20px;
  38. padding: 10px 20px;
  39. }
  40. /* 右侧导航栏 */
  41. main .navs .right .right-content{
  42. display: grid;
  43. grid-template-rows: 142px 240px;
  44. }
  45. main .navs .right .right-content .right-content-shang{
  46. display: grid;
  47. border-bottom: 1px solid #eeeeee;
  48. padding: 0 0 20px 0;
  49. }
  50. main .navs .right .right-content .right-content-shang .right-content-shang1{
  51. margin: auto;
  52. }
  53. main .navs .right .right-content .right-content-shang .right-content-shang1 img{
  54. float: left;
  55. width: 40px;
  56. height: 40px;
  57. border-radius: 100px;
  58. margin-top: 20px;
  59. }
  60. main .navs .right .right-content .right-content-shang .right-content-shang1 dl{
  61. float: right;
  62. width: 105px;
  63. margin-top: 15px;
  64. padding: 0 10px;
  65. }
  66. main .navs .right .right-content .right-content-shang .right-content-shang1 dd{
  67. color: #b6b6b6;
  68. }
  69. main .navs .right .right-content .right-content-shang .right-content-shang1 a{
  70. font-weight: bold;
  71. }
  72. main .navs .right .right-content .right-content-shang .right-content-shang2{
  73. width: 150px;
  74. height: 34px;
  75. background: #f11717;
  76. border-radius: 100px;
  77. line-height: 34px;
  78. text-align: center;
  79. text-decoration: none;
  80. overflow: hidden;
  81. margin-top: 20px;
  82. margin-left: 20px;
  83. }
  84. main .navs .right .right-content .right-content-shang .right-content-shang2 a {
  85. color: #ffffff;
  86. }
  87. main .navs .right .right-content .right-content-xia{
  88. display: grid;
  89. grid-template-rows: 50px 1fr;
  90. margin-left: 20px;
  91. }
  92. main .navs .right .right-content .right-content-xia .f1 a{
  93. width: 31px;
  94. height: 16px;
  95. background: #ff583d;
  96. border-radius: 2px;
  97. font-size: 12px;
  98. color: #ffffff;
  99. line-height: 16px;
  100. }
  101. main .navs .right .right-content .right-content-xia .f2 a:hover{
  102. color: red;
  103. }
  104. main .navs .right .right-content .right-content-xia .f1{
  105. place-self: center start;
  106. }
  107. main .navs .right .right-content .right-content-xia .f1 span{
  108. margin-right: 10px;
  109. }
  110. main .navs .right .right-content .right-content-xia .f1 a{
  111. padding: 1px 3px;
  112. }
  113. main .navs .right .right-content .right-content-xia .f2{
  114. display: grid;
  115. place-items: center start;
  116. }
  117. main .navs .right .right-content .right-content-xia .f2 a{
  118. color: #b6b6b6;
  119. }
  120. /* 底部左侧 */
  121. main .navs .bottom-left {
  122. display: grid;
  123. grid-template-columns: 100px 1fr;/
  124. }
  125. main .navs .bottom-left .desc {
  126. display: grid;
  127. place-items: center;
  128. padding: 16px;
  129. }
  130. main .navs .bottom-left .detail img {
  131. width: 100%;
  132. grid-row: span 2;
  133. }
  134. main .navs .bottom-left .detail {
  135. display: flex;
  136. place-items: center;
  137. place-content: space-between;
  138. }
  139. main .navs .bottom-left .detail li {
  140. display: grid;
  141. grid-template-columns: 36px 85px;
  142. gap: 0 10px;
  143. place-items: center start;
  144. }
  145. main .navs .bottom-left .detail li a {
  146. font-size: 14px;
  147. }
  148. main .navs .bottom-left .detail li a:hover {
  149. color: red;
  150. }
  151. main .navs .bottom-left .detail li span,
  152. main .navs .bottom-left .desc span {
  153. font-size: 12px;
  154. color: #999;
  155. }
  156. main .navs .bottom-right .content{
  157. display: grid;
  158. grid-template-columns: repeat(2,1fr);
  159. place-items: center;
  160. place-content: space-between;
  161. }
  162. main .navs .bottom-right .content li a h2{
  163. font-size: 12px;
  164. font-weight: bold;
  165. height: 16px;
  166. line-height: 16px;
  167. overflow: hidden;
  168. margin-top: 5px;
  169. }
  170. main .navs .bottom-right .content li a b{
  171. font-size: 30px;
  172. margin-left: 13px;
  173. }
  174. main .navs .bottom-right .content li {
  175. float: left;
  176. width: 70px;
  177. margin-top: 13px;
  178. margin-left: 20px;
  179. }
  180. main .navs .right .right-content .right-content-xia .f2 p span{
  181. padding: 0 10px 0 0;
  182. }
相关推荐
阅读 +