博客列表 >仿Php中文网作业

仿Php中文网作业

移动用户-5455461
移动用户-5455461原创
2020年04月13日 19:00:08490浏览

仿站作业链接

  1. 结合所学知识写了整整一天,感觉还有很多的问题,最上面的LOGO条和最下面的倒是固定住了,但是都会把内容遮住,还没有搞明白。
  2. 终于有一点眉目了,很开心,感谢老师的精心教授!
  3. flex的容器部分的学习已经感觉有点清晰了,项目的属性设置还有些问题,还要继续巩固。

代码及效果图

  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <title>Document</title>
  7. <link rel="stylesheet" href="static/css/font-icon.css">
  8. <style>
  9. * {
  10. margin: 0;
  11. padding: 0;
  12. }
  13. html {
  14. width: 100vh;
  15. /* height: 100vh; */
  16. }
  17. body {
  18. width: 98.5vw;
  19. /* min-width: 450px; */
  20. box-sizing: border-box;
  21. margin: 0;
  22. padding: 5px;
  23. display: flex;
  24. flex-flow: column nowrap;
  25. font-size: 18px;
  26. /* align-items: center; */
  27. }
  28. a {
  29. color: #000000;
  30. /* font-size: 12px; */
  31. text-decoration: none;
  32. }
  33. a:hover {
  34. color: lightseagreen;
  35. }
  36. header>img {
  37. width: 100px;
  38. }
  39. header {
  40. padding: 0 10px;
  41. background-color: black;
  42. color: #ffffff;
  43. position: fixed;
  44. /* top: 0; */
  45. width: 96vw;
  46. display: flex;
  47. flex-flow: row nowrap;
  48. justify-content: space-between;
  49. align-items: center;
  50. }
  51. .logofont {
  52. font-size: 20px;
  53. }
  54. .slide>img {
  55. /* margin: 2px; */
  56. width: 100%;
  57. }
  58. nav {
  59. /* margin-top: 10px; */
  60. display: flex;
  61. flex-flow: row wrap;
  62. justify-content: center;
  63. height: 200px;
  64. /* font-size: 1.0rem; */
  65. }
  66. nav>div a {
  67. font-size: 1rem;
  68. }
  69. nav>div {
  70. width: 25%;
  71. }
  72. nav>div>a>img {
  73. width: 50px;
  74. }
  75. nav>div {
  76. display: flex;
  77. flex-flow: column nowrap;
  78. align-items: center;
  79. justify-content: center;
  80. font-size: 1.5rem;
  81. /* align-self: stretch; */
  82. /* flex: 1 1 auto; */
  83. }
  84. nav>div>a {
  85. /* flex: 1 1 auto; */
  86. }
  87. h2 {
  88. font-size: 1.2rem;
  89. }
  90. .hotclass>.hotclasspic {
  91. /* width: 95vw; */
  92. display: flex;
  93. flex-flow: row nowrap;
  94. justify-content: space-between;
  95. }
  96. .hotclass>.hotclasspic>a>img {
  97. width: 48vw;
  98. height: 9vh;
  99. /* padding:0 10px; */
  100. }
  101. .hotclass>.hotclasstxt>.hotclasslist>a img {
  102. width: 45vw;
  103. height: 8vh;
  104. }
  105. .hotclasstxt {
  106. justify-content: center;
  107. }
  108. .hotclasstxt {
  109. padding: 5px;
  110. margin-top: 10px;
  111. display: flex;
  112. flex-flow: row nowrap;
  113. justify-content: space-between;
  114. }
  115. .hotclasslist {
  116. /* flex-grow: 1; */
  117. }
  118. .hotclasslisttxt {
  119. /* flex-grow: 2; */
  120. /* width: 50vw; */
  121. /* flex: 1; */
  122. }
  123. .hotclasslisttxt {
  124. padding: 10px;
  125. display: flex;
  126. flex-flow: column nowrap;
  127. }
  128. .hotclassgrade>span {
  129. font-size: 0.7rem;
  130. }
  131. .hotclassgrade>span:first-of-type {
  132. color: seashell;
  133. background-color: #666666;
  134. border-radius: 5px;
  135. }
  136. .newclass>img {
  137. width: 45vw;
  138. height: 8vh;
  139. }
  140. .newclass {
  141. padding: 5px;
  142. display: flex;
  143. flex-flow: row nowrap;
  144. justify-content: space-between;
  145. }
  146. .newclass>.newupdatetext {
  147. /* padding: 10px; */
  148. margin-left: 10px;
  149. display: flex;
  150. flex-flow: column nowrap;
  151. justify-content: space-around;
  152. }
  153. .newupdatetext>span>i:first-of-type {
  154. background-color: #000;
  155. color: #ffffff;
  156. padding: 3px;
  157. border-radius: 5px;
  158. }
  159. .newupdatetext>span:last-of-type {
  160. display: flex;
  161. flex-flow: row nowrap;
  162. justify-content: space-between;
  163. }
  164. h5 {
  165. text-align: center;
  166. color: #9e9a9a;
  167. }
  168. .newarticle {
  169. padding: 5px;
  170. box-shadow: 1px 1px 10px 5px #d8d5d5;
  171. /* width: 89vw; */
  172. /* border: 1 solid red; */
  173. }
  174. .newarticle>span>i {
  175. font-size: 0.8rem;
  176. }
  177. .newarticle>span>img {
  178. width: 45vw;
  179. }
  180. .newarticle {
  181. margin-top: 15px;
  182. display: flex;
  183. flex-flow: row nowrap;
  184. justify-content: space-between;
  185. }
  186. .newarticle>span:first-of-type {
  187. display: flex;
  188. flex-flow: column nowrap;
  189. }
  190. .newarticle>span>p:first-of-type {
  191. font-size: 1.0rem;
  192. }
  193. .newarticle>span>p:last-of-type {
  194. font-size: 0.8rem;
  195. }
  196. .newblog {
  197. margin-top: 10px;
  198. width: 97vw;
  199. box-shadow: 1px 1px 10px 5px #d8d5d5;
  200. padding: 10px;
  201. display: flex;
  202. flex-flow: row nowrap;
  203. justify-content: space-between;
  204. }
  205. .newblog>span:first-of-type {
  206. font-size: 0.8rem;
  207. }
  208. .newblog>span:last-of-type {
  209. font-size: 0.7rem;
  210. }
  211. .newqa {
  212. margin-top: 10px;
  213. width: 97vw;
  214. box-shadow: 0px 1px 10px 5px #d8d5d5;
  215. padding: 10px;
  216. display: flex;
  217. flex-flow: row nowrap;
  218. justify-content: space-between;
  219. }
  220. .newqa>span:first-of-type {
  221. font-size: 0.8rem;
  222. }
  223. .newqa>span:last-of-type {
  224. font-size: 0.7rem;
  225. }
  226. footer {
  227. width: 99vw;
  228. height: 60px;
  229. background-color: #9e9e9e;
  230. display: flex;
  231. flex-flow: row nowrap;
  232. justify-content: space-around;
  233. position: fixed;
  234. bottom: 0;
  235. }
  236. footer>a {
  237. display: flex;
  238. flex-flow: column nowrap;
  239. justify-content: center;
  240. align-items: center;
  241. }
  242. footer>a>span:first-of-type {
  243. font-size: 1.6rem;
  244. }
  245. footer>a>span:last-of-type {
  246. font-size: 1rem;
  247. }
  248. </style>
  249. </head>
  250. <body>
  251. <!-- 顶部 -->
  252. <header>
  253. <div class="iconfont logofont"></div>
  254. <img src="static/images/logo.png" alt="">
  255. <div class="iconfont logofont"></div>
  256. </header>
  257. <!-- 轮播图 -->
  258. <div class="slide"><img src="static/images/11.png" alt=""></div>
  259. <!-- 导航 -->
  260. <nav>
  261. <div>
  262. <a href=""><img src="static/images/html.png" alt=""></a>
  263. <a href="">HTML/CSS</a>
  264. </div>
  265. <div>
  266. <a href=""><img src="static/images/JavaScript.png" alt=""></a>
  267. <a href="">JavaScript</a>
  268. </div>
  269. <div>
  270. <a href=""><img src="static/images/code.png" alt=""></a>
  271. <a href="">服务器</a>
  272. </div>
  273. <div>
  274. <a href=""><img src="static/images/sql.png" alt=""></a>
  275. <a href="">数据库</a>
  276. </div>
  277. <div>
  278. <a href=""><img src="static/images/app.png" alt=""></a>
  279. <a href="">移动端</a>
  280. </div>
  281. <div>
  282. <a href=""><img src="static/images/manual.png" alt=""></a>
  283. <a href="">手册</a>
  284. </div>
  285. <div>
  286. <a href=""><img src="static/images/tool2.png" alt=""></a>
  287. <a href="">工具</a>
  288. </div>
  289. <div>
  290. <a href=""><img src="static/images/live.png" alt=""></a>
  291. <a href="">直播</a>
  292. </div>
  293. </nav>
  294. <!-- 推荐课程 -->
  295. <h2>推荐课程</h2>
  296. <div class="hotclass">
  297. <div class="hotclasspic">
  298. <a href=""><img src="static/images/hotcalss.jpg" alt=""></a>
  299. <a href=""><img src="static/images/hotcalss.jpg" alt=""></a>
  300. </div>
  301. <div class="hotclasstxt">
  302. <div class="hotclasslist">
  303. <a href=""><img src="static/images/ci30.jpg" alt=""></a>
  304. </div>
  305. <div class="hotclasslisttxt">
  306. <a href="" style="font-size: 1rem;">CI框架30分钟极速入门</a>
  307. <div class="hotclassgrade">
  308. <span>中级</span> <span>61302次播放</span>
  309. </div>
  310. </div>
  311. </div>
  312. <div class="hotclasstxt">
  313. <div class="hotclasslist">
  314. <a href=""><img src="static/images/2018frt.jpg" alt=""></a>
  315. </div>
  316. <div class="hotclasslisttxt">
  317. <a href="" style="font-size: 1rem;">2018前端入门_HTML5</a>
  318. <div class="hotclassgrade">
  319. <span>初级</span> <span>30637次播放</span>
  320. </div>
  321. </div>
  322. </div>
  323. </div>
  324. <!-- 最新更新 -->
  325. <h2>最新更新</h2>
  326. <div class="newclass">
  327. <div class="newupdate">
  328. <a href=""><img src="static/images/n1.png" style="width: 45vw;height: 8vh;" alt=""></a>
  329. </div>
  330. <div class="newupdatetext">
  331. <span><a href="" style="font-size: 1.0rem;">PHP快速操控Excel之PhpS</a></span>
  332. <span style="font-size: 0.8rem;">老的PHPExcel已经停止更新了!目前最新的</span>
  333. <span><i style="font-size: 0.6rem;">初级</i><i style="font-size: 0.6rem;">15203次播放</i></span>
  334. </div>
  335. </div>
  336. <div class="newclass">
  337. <div class="newupdate">
  338. <a href=""><img src="static/images/n2.png" style="width: 45vw;height: 8vh;" alt=""></a>
  339. </div>
  340. <div class="newupdatetext">
  341. <span><a href="" style="font-size: 1.0rem;">Thinkphp6.0正式版视频教程</a></span>
  342. <span style="font-size: 0.8rem;">老的PHPExcel已经停止更新了!目前最新的</span>
  343. <span><i style="font-size: 0.6rem;">初级</i><i style="font-size: 0.6rem;">15203次播放</i></span>
  344. </div>
  345. </div>
  346. <div class="newclass">
  347. <div class="newupdate">
  348. <a href=""><img src="static/images/n3.jpg" style="width: 45vw;height: 8vh;" alt=""></a>
  349. </div>
  350. <div class="newupdatetext">
  351. <span><a href="" style="font-size: 1.0rem;">2019python自学视频</a></span>
  352. <span style="font-size: 0.8rem;">老的PHPExcel已经停止更新了!目前最新的</span>
  353. <span><i style="font-size: 0.6rem;">初级</i><i style="font-size: 0.6rem;">15203次播放</i></span>
  354. </div>
  355. </div>
  356. <div class="newclass">
  357. <div class="newupdate">
  358. <a href=""><img src="static/images/n4.png" style="width: 45vw;height: 8vh;" alt=""></a>
  359. </div>
  360. <div class="newupdatetext">
  361. <span><a href="" style="font-size: 1.0rem;">PHP开发免费公益直播课</a></span>
  362. <span style="font-size: 0.8rem;">老的PHPExcel已经停止更新了!目前最新的</span>
  363. <span><i style="font-size: 0.6rem;">初级</i><i style="font-size: 0.6rem;">15203次播放</i></span>
  364. </div>
  365. </div>
  366. <div class="newclass">
  367. <div class="newupdate">
  368. <a href=""><img src="static/images/n5.png" style="width: 45vw;height: 8vh;" alt=""></a>
  369. </div>
  370. <div class="newupdatetext">
  371. <span><a href="" style="font-size: 1.0rem;">从零开始到WEB响应式布局</a></span>
  372. <span style="font-size: 0.8rem;">老的PHPExcel已经停止更新了!目前最新的</span>
  373. <span><i style="font-size: 0.6rem;">初级</i><i style="font-size: 0.6rem;">15203次播放</i></span>
  374. </div>
  375. </div>
  376. <div class="newclass">
  377. <div class="newupdate">
  378. <a href=""><img src="static/images/n6.png" style="width: 45vw;height: 8vh;" alt=""></a>
  379. </div>
  380. <div class="newupdatetext">
  381. <span><a href="" style="font-size: 1.0rem;">PHP文件基础操作</a></span>
  382. <span style="font-size: 0.8rem;">老的PHPExcel已经停止更新了!目前最新的</span>
  383. <span><i style="font-size: 0.6rem;">初级</i><i style="font-size: 0.6rem;">15203次播放</i></span>
  384. </div>
  385. </div>
  386. <h2>最新文章</h2>
  387. <div class="newarticle">
  388. <span>
  389. <p><a href="">PS怎么保存调好的预设??</a></p>
  390. <p>发布时间:2020-1-13</p>
  391. </span>
  392. <span><a href=""><img src="static/images/a1.jpg" alt="" style="widows: 45vw;height: 8vh;"></a></span>
  393. </div>
  394. <div class="newarticle">
  395. <span>
  396. <p><a href="">3dmax2014怎么切换中文版</a></p>
  397. <p>发布时间:2020-1-13</p>
  398. </span>
  399. <span><a href=""><img src="static/images/a2.jpg" alt="" style="widows: 45vw;height: 8vh;"></a></span>
  400. </div>
  401. <div class="newarticle">
  402. <span>
  403. <p><a href="">身份证复制粘贴到exls后显示E+17怎么办</a></p>
  404. <p>发布时间:2020-1-13</p>
  405. </span>
  406. <span><a href=""><img src="static/images/a3.jpg" alt="" style="widows: 45vw;height: 8vh;"></a></span>
  407. </div>
  408. <div class="newarticle">
  409. <span>
  410. <p><a href="">windows电脑提示已关闭无线功能怎么</a></p>
  411. <p>发布时间:2020-1-13</p>
  412. </span>
  413. <span><a href=""><img src="static/images/a4.jpg" alt="" style="widows: 45vw;height: 8vh;"></a></span>
  414. </div>
  415. <div class="newarticle">
  416. <span>
  417. <p><a href="">msc是什么</a></p>
  418. <p>发布时间:2020-1-13</p>
  419. </span>
  420. <span><a href=""><img src="static/images/a5.jpg" alt="" style="widows: 45vw;height: 8vh;"></a></span>
  421. </div>
  422. <h5>更多内容</h5>
  423. <!-- 最新博文 -->
  424. <h2>最新博文</h2>
  425. <div class="newblog">
  426. <span>细说选择器:简单选择器、上下文选择器、</span>
  427. <span>2020-04-13</span>
  428. </div>
  429. <div class="newblog">
  430. <span>CSS 中各类选择器的属性及应用</span>
  431. <span>2020-04-13</span>
  432. </div>
  433. <div class="newblog">
  434. <span>CSS3:弹性盒子flex布局</span>
  435. <span>2020-04-13</span>
  436. </div>
  437. <div class="newblog">
  438. <span>flex容器中的主轴方向与项目换行缩写、主</span>
  439. <span>2020-04-13</span>
  440. </div>
  441. <div class="newblog">
  442. <span>Jquery+AJAX上传文件,无刷新上传并重</span>
  443. <span>2020-04-13</span>
  444. </div>
  445. <h5>更多内容</h5>
  446. <!-- 最新问答 -->
  447. <h2>最新问答</h2>
  448. <div class="newqa">
  449. <span>为什么老师,你de button按钮处可以有</span>
  450. <span>2020-04-13</span>
  451. </div>
  452. <div class="newqa">
  453. <span>url访问admin下的控制器的方法,有问题</span>
  454. <span>2020-04-13</span>
  455. </div>
  456. <div class="newqa">
  457. <span>php+workerman实现新订单提示语音</span>
  458. <span>2020-04-13</span>
  459. </div>
  460. <div class="newqa">
  461. <span>不出现tp6.0页面</span>
  462. <span>2020-04-13</span>
  463. </div>
  464. <div class="newqa">
  465. <span>数据库密码··</span>
  466. <span>2020-04-13</span>
  467. </div>
  468. <h5>更多内容</h5>
  469. <footer>
  470. <a href="">
  471. <span class="iconfont"></span>
  472. <span>首页</span>
  473. </a>
  474. <a href="">
  475. <span class="iconfont"></span>
  476. <span>视频</span>
  477. </a>
  478. <a href="">
  479. <span class="iconfont"></span>
  480. <span>社区</span>
  481. </a>
  482. <a href="">
  483. <span class="iconfont"></span>
  484. <span>我的</span>
  485. </a>
  486. </footer>
  487. </body>
  488. </html>
声明:本文内容转载自脚本之家,由网友自发贡献,版权归原作者所有,如您发现涉嫌抄袭侵权,请联系admin@php.cn 核实处理。
全部评论
文明上网理性发言,请遵守新闻评论服务协议