亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

搜索
博主信息
博文 48
粉絲 3
評(píng)論 1
訪問量 44973
最新下載
更多>
網(wǎng)站特效
網(wǎng)站源碼
網(wǎng)站素材
前端模板
使用flex和girl布局仿PHP中文網(wǎng)部分靜態(tài)頁面
吳長清
原創(chuàng)
903人瀏覽過

效果圖:

HTML代碼塊

  1. <body>
  2. <!-- 頁眉 -->
  3. <header>
  4. <div class="top">
  5. <div class="content">
  6. <span>php中文網(wǎng)-程序員夢(mèng)開始的地方</span>
  7. <div class="login">
  8. <a href="" class="iconfont icon-tixingtianchong"></a>
  9. <a><img src="static/images/user-pic.jpeg" alt="" /></a>
  10. </div>
  11. </div>
  12. </div>
  13. <div class="bottom">
  14. <div class="content">
  15. <a href="#"><img src="static/images/logo.png" alt="" /></a>
  16. <nav class="navs">
  17. <a href="#" class="item">首頁</a>
  18. <a href="#" class="item">視頻教程</a>
  19. <a href="#" class="item">學(xué)習(xí)路徑</a>
  20. <a href="#" class="item">PHP培訓(xùn)</a>
  21. <a href="#" class="item">資源下載</a>
  22. <a href="#" class="item">技術(shù)文章</a>
  23. <a href="#" class="item">社區(qū)</a>
  24. <a href="#" class="item">APP下載</a>
  25. </nav>
  26. <div class="search">
  27. <input type="search" placeholder="請(qǐng)輸入關(guān)鍵字" />
  28. <span class="iconfont icon-fangdajing1"></span>
  29. </div>
  30. </div>
  31. </div>
  32. </header>
  33. <!-- 主體內(nèi)容 -->
  34. <main>
  35. <div class="navs">
  36. <div class="left">
  37. <a href="">php開發(fā)</a>
  38. <a href="">大前端</a>
  39. <a href="">后端開發(fā)</a>
  40. <a href="">數(shù)據(jù)庫</a>
  41. <a href="">移動(dòng)端</a>
  42. <a href="">運(yùn)維開發(fā)</a>
  43. <a href="">UI設(shè)計(jì)</a>
  44. <a href="">計(jì)算機(jī)基礎(chǔ)</a>
  45. </div>
  46. <div class="slider">
  47. <a href=""><img src="static/images/slider.jpeg" alt="" /></a>
  48. </div>
  49. <div class="right">
  50. <div class="userinfo">
  51. <img
  52. src="static/images/user-pic.jpeg" alt="" />
  53. <a href="#">朱老師</a>
  54. <span>p豆:1200</span>
  55. <div class="btn">
  56. <button>我的學(xué)習(xí)</button>
  57. </div>
  58. </div>
  59. <ul class="derail">
  60. <li onclick="">
  61. <span>問答社區(qū)</span>
  62. <a href="#"><span class="desc">答疑</span></a>
  63. </li>
  64. <li onclick="">
  65. <span>頭條</span>
  66. <a href="#"><span>vue發(fā)展情況</span></a>
  67. </li>
  68. <li onclick="">
  69. <span>福利</span>
  70. <a href="#"><span>限時(shí)折扣</span></a>
  71. </li>
  72. <li onclick="">
  73. <span>新班</span>
  74. <a href="#"><span>20期PHP線上班</span></a>
  75. </li>
  76. <li onclick="">
  77. <span>招募</span>
  78. <a href="#"><span>課程合作計(jì)劃</span></a>
  79. </li>
  80. <li onclick="">
  81. <span>公告</span>
  82. <a href="#"><span>App上線啦</span></a>
  83. </li>
  84. </ul>
  85. </div>
  86. <div class="bottom-left">
  87. <div class="desc">
  88. <div class="title">學(xué)習(xí)路徑</div>
  89. <span>全部7個(gè)&gt;</span>
  90. </div>
  91. <ul class="detail">
  92. <li onclick="">
  93. <img src="static/images/dgjj.png" alt="" />
  94. <a href="">獨(dú)孤九賤</a>
  95. <span>9門課程</span>
  96. </li>
  97. <li onclick="">
  98. <img src="static/images/ynxj.png" alt="" />
  99. <a href="">獨(dú)孤九賤</a>
  100. <span>9門課程</span>
  101. </li>
  102. <li onclick="">
  103. <img src="static/images/tlbb.png" alt="" />
  104. <a href="">獨(dú)孤九賤</a>
  105. <span>9門課程</span>
  106. </li>
  107. <li onclick="">
  108. <img src="static/images/phpkjkf.png" alt="" />
  109. <a href="">獨(dú)孤九賤</a>
  110. <span>9門課程</span>
  111. </li>
  112. <li onclick="">
  113. <img src="static/images/phpksrm.png" alt="" />
  114. <a href="">獨(dú)孤九賤</a>
  115. <span>9門課程</span>
  116. </li>
  117. </ul>
  118. </div>
  119. <div class="bottom-right">
  120. <div class="weixin">
  121. <span class="iconfont icon-weixin1"></span>
  122. <span>官方公眾號(hào)</span>
  123. </div>
  124. <div class="qq">
  125. <span class="iconfont icon-QQ"></span>
  126. <span>官方QQ群</span>
  127. </div>
  128. </div>
  129. <div class="live">
  130. <div class="top">
  131. <span class="title">直播課</span>
  132. <a href="" class="more">更多></a>
  133. </div>
  134. <div class="bottom">
  135. <ul class="list">
  136. <li class="item">
  137. <img src="static/images/live/1.jpg" alt="" />
  138. <a href="#">
  139. 公益直播:PHP入門到實(shí)戰(zhàn)--實(shí)現(xiàn)郵箱驗(yàn)證(隊(duì)列發(fā)送郵件)
  140. </a>
  141. <span class="sp1">精彩回放</span>
  142. <span class="sp2">21215人觀看</span>
  143. </li>
  144. <li class="item">
  145. <img src="static/images/live/2.jpg" alt="" />
  146. <a href="#"> 第二期_大前端線上班 </a>
  147. <span class="sp1">精彩回放</span>
  148. <span class="sp2">21215人觀看</span>
  149. </li>
  150. <li class="item">
  151. <img src="static/images/live/3.png" alt="" />
  152. <a href="#"> 第二十期_前端開發(fā) </a>
  153. <span class="sp1">精彩回放</span>
  154. <span class="sp2">21215人觀看</span>
  155. </li>
  156. <li class="item"></li>
  157. </ul>
  158. </div>
  159. </div>
  160. </div>
  161. </main>
  162. <!-- 頁腳 -->
  163. <footer></footer>
  164. </body>

css代碼

  1. @import url(reset.css);
  2. /* 頁眉 */
  3. /* 頂部 */
  4. body header .top {
  5. width: 100vw;
  6. height: 40px;
  7. background-color: #343434;
  8. }
  9. body header .top .content {
  10. width: 1200px;
  11. height: 40px;
  12. margin: 0 auto;
  13. display: flex;
  14. place-content: space-between;
  15. place-items: center;
  16. }
  17. body header .top .content span {
  18. width: 300px;
  19. color: rgba(206, 205, 205, 1);
  20. font-family: "微軟雅黑";
  21. font-size: 14px;
  22. }
  23. body header .top .content .login {
  24. width: 100px;
  25. display: grid;
  26. grid-template-columns: repeat(2, 1fr);
  27. place-items: center;
  28. }
  29. body header .top .content .login .icon-tixingtianchong {
  30. color: #eee;
  31. font-size: larger;
  32. }
  33. body header .top .content .login img {
  34. width: 50%;
  35. border-radius: 50%;
  36. }
  37. /* 底部 */
  38. body header .bottom {
  39. width: 100vw;
  40. height: 90px;
  41. background-color: white;
  42. box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  43. }
  44. body header .bottom .content {
  45. width: 1200px;
  46. margin: 0 auto;
  47. display: grid;
  48. grid-template-columns: 140px 1fr 200px;
  49. grid-auto-rows: 90px;
  50. gap: 10px;
  51. place-items: center start;
  52. }
  53. body header .bottom .content img {
  54. width: 140px;
  55. margin-top: 3px;
  56. }
  57. body header .bottom .content .navs {
  58. display: flex;
  59. margin-left: 40px;
  60. }
  61. body header .bottom .content .navs a {
  62. padding: 0 10px;
  63. font-size: larger;
  64. }
  65. body header .bottom .content .navs a:first-of-type,
  66. body header .bottom .content .navs a:hover {
  67. color: red;
  68. font-weight: bold;
  69. }
  70. body header .bottom .content .search {
  71. display: flex;
  72. }
  73. body header .bottom .content .search input[type="search"] {
  74. border: none;
  75. background-color: #eee;
  76. width: 200px;
  77. height: 36px;
  78. border-radius: 20px;
  79. padding-left: 10px;
  80. outline: none;
  81. }
  82. body header .bottom .content .search .icon-fangdajing1 {
  83. font-size: 22px;
  84. left: -40px;
  85. top: 5px;
  86. color: rgb(168, 167, 167);
  87. position: relative;
  88. }
  89. body header .bottom .content .search .icon-fangdajing1:hover {
  90. color: red;
  91. cursor: pointer;
  92. }
  93. body main .navs {
  94. /* 2行3列 */
  95. display: grid;
  96. grid-template-rows: 400px 80px;
  97. grid-template-columns: 160px 810px 190px;
  98. gap: 20px;
  99. place-content: center;
  100. margin: 30px 0;
  101. }
  102. /* 統(tǒng)一樣式,完成后可看到基本框架 */
  103. body main .navs > * {
  104. background-color: #fff;
  105. border-radius: 20px;
  106. }
  107. /* 底部左邊占2列 */
  108. body main .navs .bottom-left {
  109. grid-column: span 2;
  110. }
  111. /* 整體布局完成,剩下就是細(xì)節(jié)了 */
  112. /* 上部左邊導(dǎo)航 */
  113. body main .navs .left {
  114. padding: 20px 0;
  115. /* grid: 默認(rèn)每個(gè)項(xiàng)目都是"塊級(jí)", 垂直排列 */
  116. /* flex: 默認(rèn)每個(gè)項(xiàng)目都是"行內(nèi)塊級(jí)", 水平排列 */
  117. display: grid;
  118. /* 當(dāng)前項(xiàng)目在每個(gè)網(wǎng)絡(luò)單元中, 垂直,水平均居中 */
  119. /* place-items: 垂直方向 水平方向; */
  120. place-items: center;
  121. }
  122. body main .navs .left a {
  123. padding: 10px 20px;
  124. }
  125. body main .navs .left a:hover {
  126. border-radius: 20px;
  127. color: red;
  128. background-color: rgb(250, 223, 227);
  129. }
  130. /* 輪播圖,單圖模擬 */
  131. body main .navs .slider img {
  132. width: 100%;
  133. border-radius: 20px;
  134. }
  135. /* 底部左側(cè) */
  136. body main .navs .bottom-left {
  137. display: grid;
  138. grid-template-columns: 100px 1fr;
  139. }
  140. body main .navs .bottom-left .desc {
  141. padding: 16px 0;
  142. display: grid;
  143. place-items: center;
  144. font-size: 14px;
  145. }
  146. body main .navs .bottom-left .desc span {
  147. font-size: 12px;
  148. color: #999;
  149. }
  150. body main .navs .bottom-left .detail {
  151. display: flex;
  152. place-items: center;
  153. place-content: space-between;
  154. padding: 20px;
  155. }
  156. body main .navs .bottom-left .detail li {
  157. display: grid;
  158. grid-template-columns: 36px 85px;
  159. grid-template-columns: repeat(2, 36);
  160. gap: 0 10px;
  161. place-items: center start;
  162. }
  163. body main .navs .bottom-left .detail img {
  164. width: 100%;
  165. grid-row: span 2;
  166. }
  167. body main .navs .bottom-left .detail li a {
  168. font-size: 14px;
  169. }
  170. body main .navs .bottom-left .detail li a:hover {
  171. color: red;
  172. }
  173. body main .navs .bottom-left .detail li span {
  174. font-size: 12px;
  175. color: #999;
  176. }
  177. /* 用戶信息 */
  178. body main .navs .right {
  179. display: grid;
  180. grid-template-rows: 140px 1fr;
  181. place-items: center;
  182. }
  183. body main .navs .right .userinfo {
  184. width: 100%;
  185. display: grid;
  186. grid-template-columns: 90px 100px;
  187. grid-template-rows: 30px 30px 70px;
  188. }
  189. body main .navs .right .userinfo img {
  190. grid-row: span 2;
  191. border-radius: 40px;
  192. place-self: center;
  193. }
  194. body main .navs .right .userinfo a {
  195. place-self: center start;
  196. }
  197. body main .navs .right .userinfo span {
  198. color: rgb(121, 120, 120);
  199. font-size: 12px;
  200. }
  201. body main .navs .right .userinfo a:hover {
  202. color: red;
  203. }
  204. body main .navs .right .userinfo a {
  205. font-family: "微軟雅黑";
  206. font-weight: bold;
  207. font-size: 12px;
  208. color: black;
  209. }
  210. body main .navs .right .userinfo .btn {
  211. width: 100%;
  212. height: 70px;
  213. grid-column: span 2;
  214. border-bottom: 1px solid rgba(146, 145, 145, 0.3);
  215. }
  216. body main .navs .right .userinfo .btn button {
  217. border-radius: 40px;
  218. width: 80%;
  219. height: 30px;
  220. margin-top: 15px;
  221. border: none;
  222. background-color: red;
  223. font-weight: bold;
  224. cursor: pointer;
  225. margin-left: 10%;
  226. color: #fff;
  227. }
  228. body main .navs .right .derail {
  229. margin: auto;
  230. font-size: 14px;
  231. }
  232. body main .navs .right .derail li {
  233. display: grid;
  234. grid-template-columns: 60px 100px;
  235. grid-auto-rows: 30px;
  236. }
  237. body main .navs .right .derail li span {
  238. place-self: center;
  239. font-weight: bold;
  240. }
  241. body main .navs .right .derail li a span {
  242. font-weight: lighter;
  243. color: rgb(151, 150, 150);
  244. }
  245. body main .navs .right .derail li:first-of-type a span {
  246. display: block;
  247. width: 40px;
  248. text-align: center;
  249. background-color: red;
  250. color: #fff;
  251. margin-left: 10px;
  252. }
  253. body main .navs .right .derail li a {
  254. place-self: center start;
  255. }
  256. /* 底部右邊 */
  257. body main .navs .bottom-right {
  258. display: flex;
  259. place-content: space-around;
  260. }
  261. body main .navs .bottom-right .weixin,
  262. body main .navs .bottom-right .qq {
  263. display: grid;
  264. place-items: center;
  265. font-weight: bold;
  266. }
  267. body main .navs .bottom-right .weixin span:last-of-type,
  268. body main .navs .bottom-right .qq span:last-of-type {
  269. font-size: 12px;
  270. place-self: start center;
  271. }
  272. body main .navs .bottom-right .weixin .icon-weixin1,
  273. body main .navs .bottom-right .qq .icon-QQ {
  274. display: inline-block;
  275. font-size: 16px;
  276. width: 30px;
  277. height: 30px;
  278. text-align: center;
  279. line-height: 30px;
  280. color: #fff;
  281. background-color: #aaa;
  282. border-radius: 30px;
  283. }
  284. /* 直播課板塊 */
  285. body main .navs .live {
  286. width: 1200px;
  287. display: flex;
  288. flex-flow: column nowrap;
  289. background-color: rgb(243, 245, 247);
  290. }
  291. /* 頂部 */
  292. body main .navs .live .top {
  293. width: 100%;
  294. height: 32px;
  295. display: flex;
  296. place-content: space-between;
  297. place-items: center;
  298. }
  299. body main .navs .live .top .title {
  300. font-size: 22px;
  301. font-weight: bold;
  302. color: #333333;
  303. }
  304. body main .navs .live .top .more {
  305. margin-right: 5px;
  306. font-size: 14px;
  307. color: #999999;
  308. }
  309. /* 底部 */
  310. body main .navs .live .bottom {
  311. width: 100%;
  312. margin-top: 10px;
  313. }
  314. body main .navs .live .bottom .list {
  315. display: flex;
  316. place-content: space-between;
  317. }
  318. body main .navs .live .bottom .list .item {
  319. width: 280px;
  320. height: 260px;
  321. background-color: white;
  322. border-radius: 10px;
  323. display: grid;
  324. grid-template-columns: 140px 140px;
  325. grid-template-rows: 160px 50px 50px;
  326. place-content: start center;
  327. }
  328. body main .navs .live .bottom .list img {
  329. width: 280px;
  330. height: 160px;
  331. border-radius: 10px 10px 0 0;
  332. grid-column: span 2;
  333. }
  334. body main .navs .live .bottom .list a {
  335. width: 245px;
  336. margin: auto;
  337. grid-column: span 2;
  338. color: #333333;
  339. }
  340. body main .navs .live .top .more:hover,
  341. body main .navs .live .bottom .list a:hover{
  342. color: red;
  343. }
  344. body main .navs .live .bottom .list .sp1 {
  345. width: 120px;
  346. height: 18px;
  347. margin-left: 18px;
  348. font-size: 14px;
  349. place-self: center start;
  350. }
  351. body main .navs .live .bottom .list .sp2 {
  352. width: 100px;
  353. height: 18px;
  354. font-size: 14px;
  355. place-self: center end;
  356. color: #aaa;
  357. }
批改老師:PHPzPHPz

批改狀態(tài):合格

老師批語:可以,輪播圖可以等后續(xù)JS完善
本博文版權(quán)歸博主所有,轉(zhuǎn)載請(qǐng)注明地址!如有侵權(quán)、違法,請(qǐng)聯(lián)系admin@php.cn舉報(bào)處理!
全部評(píng)論 文明上網(wǎng)理性發(fā)言,請(qǐng)遵守新聞評(píng)論服務(wù)協(xié)議
0條評(píng)論
作者最新博文
關(guān)于我們 免責(zé)申明 意見反饋 講師合作 廣告合作 最新更新
php中文網(wǎng):公益在線php培訓(xùn),幫助PHP學(xué)習(xí)者快速成長!
關(guān)注服務(wù)號(hào) 技術(shù)交流群
PHP中文網(wǎng)訂閱號(hào)
每天精選資源文章推送
PHP中文網(wǎng)APP
隨時(shí)隨地碎片化學(xué)習(xí)
PHP中文網(wǎng)抖音號(hào)
發(fā)現(xiàn)有趣的

Copyright 2014-2025 http://ipnx.cn/ All Rights Reserved | php.cn | 湘ICP備2023035733號(hào)

  • 登錄PHP中文網(wǎng),和優(yōu)秀的人一起學(xué)習(xí)!
    全站2000+教程免費(fèi)學(xué)