博客列表 >pc端实战练习

pc端实战练习

暝皑祯π_π
暝皑祯π_π原创
2020年04月13日 15:35:15741浏览

效果图:





html文件

  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. <link rel="stylesheet" href="iconfont.css" />
  7. <link rel="stylesheet" href="php.css" />
  8. <title>pc端实战练习</title>
  9. </head>
  10. <body>
  11. <!-- 页眉 -->
  12. <header>
  13. <a href=""><img src="./imgs/logo1.jpg" alt="图片加载失败" /></a>
  14. <a href=""><img src="./imgs/logo.png" alt="图片加载失败" /></a>
  15. <span class="iconfont">&#xe6fd;</span>
  16. </header>
  17. <!-- 轮播图 -->
  18. <div class="carousel">
  19. <img src="./imgs/play.jpg" alt="图片加载失败" />
  20. </div>
  21. <!-- 导航区 -->
  22. <div class="nav">
  23. <div class="item">
  24. <a href=""><img src="./imgs/html1.png" alt="图片加载失败" /></a>
  25. <p>HTML/CSS</p>
  26. </div>
  27. <div class="item">
  28. <a href=""><img src="./imgs/JavaScript.png" alt="图片加载失败" /></a>
  29. <p>JavaScript</p>
  30. </div>
  31. <div class="item">
  32. <a href=""><img src="./imgs/code.png" alt="图片加载失败" /></a>
  33. <p>服务端</p>
  34. </div>
  35. <div class="item">
  36. <a href=""><img src="./imgs/sql.png" alt="图片加载失败" /></a>
  37. <p>数据库</p>
  38. </div>
  39. <div class="item">
  40. <a href=""><img src="./imgs/app.png" alt="图片加载失败" /></a>
  41. <p>移动端</p>
  42. </div>
  43. <div class="item">
  44. <a href=""><img src="./imgs/manual.png" alt="图片加载失败" /></a>
  45. <p>shouce</p>
  46. </div>
  47. <div class="item">
  48. <a href=""><img src="./imgs/tool2.png" alt="图片加载失败" /></a>
  49. <p>工具</p>
  50. </div>
  51. <div class="item">
  52. <a href=""><img src="./imgs/live.png" alt="图片加载失败" /></a>
  53. <p>直播</p>
  54. </div>
  55. </div>
  56. <h2 class="title">推荐课程</h2>
  57. <div class="one">
  58. <a href=""><img src="./imgs/81.jpg" alt="图片加载失败" /></a>
  59. <a href=""><img src="./imgs/82.jpg" alt="图片加载失败" /></a>
  60. </div>
  61. <div class="two">
  62. <a href=""><img src="./imgs/ci.jpg" alt="图片加载失败" /></a>
  63. <div class="two-one">
  64. <a href="">Cl框架30分钟极速入门</a>
  65. <div class="two-two"><span>初级</span> <span>61266次播放</span></div>
  66. </div>
  67. </div>
  68. <div class="two">
  69. <a href=""><img src="./imgs/html5.jpg" alt="图片加载失败" /></a>
  70. <div class="two-one">
  71. <a href="">2018前端入门_HTML5</a>
  72. <div class="two-two"><span>初级</span> <span>310381次播放</span></div>
  73. </div>
  74. </div>
  75. <h2 class="title">最新更新</h2>
  76. <div class="last-update">
  77. <div>
  78. <a href=""><img src="./imgs/php.png" alt="图片加载失败" /></a>
  79. </div>
  80. <div class="g">
  81. <a href=""><h3>php快速操控Excel之PhpSpreadsheet</h3></a>
  82. <p>
  83. 老的PHPExcel已经停止更新了!
  84. 目前最新的是使用phpOffice插件PhpSpreadsheet,
  85. 用纯php编写的库,它提供了一组类,
  86. 允许您读取和写入不同的电子表格文件格式!
  87. php中文网欧阳克老师原创课程!注:php运行环境需要php7.1以上
  88. </p>
  89. <div>
  90. <span>中级</span>
  91. <span>15110次播放</span>
  92. </div>
  93. </div>
  94. </div>
  95. <div class="last-update">
  96. <div>
  97. <a href=""><img src="./imgs/tp6.png" alt="图片加载失败" /></a>
  98. </div>
  99. <div class="g">
  100. <a href=""><h3>Thinkphp6.0正式版视频教程</h3></a>
  101. <p>
  102. Thinkphp6.0从2019年10月244日正式发布,相对测试版,右很多变动,
  103. 目前TP6已经相对比较稳定了,所有php中文网在2020年再次重新录制课程,
  104. 帮助快速入门!相关推荐:ThinkPHP6.0完全开发手册(注解版)http://
  105. www.php.cn/course/1049.html
  106. </p>
  107. <div>
  108. <span>中级</span>
  109. <span>48963次播放</span>
  110. </div>
  111. </div>
  112. </div>
  113. <div class="last-update">
  114. <div>
  115. <a href=""><img src="./imgs/py.jpg" alt="图片加载失败" /></a>
  116. </div>
  117. <div class="g">
  118. <a href=""><h3>2019python自学视频</h3></a>
  119. <p>
  120. 本课程适合想从零开始学习 Python 编程语言的开发人员。
  121. 由浅入深的带你进入python世界,自学python的一份好课程, 兄弟连课程
  122. </p>
  123. <div>
  124. <span>初级</span>
  125. <span>36512次播放</span>
  126. </div>
  127. </div>
  128. </div>
  129. <div class="last-update">
  130. <div>
  131. <a href=""><img src="./imgs/php1.png" alt="图片加载失败" /></a>
  132. </div>
  133. <div class="g">
  134. <a href=""><h3>PHP开发免费公益直播课</h3></a>
  135. <p>
  136. 主讲:php中文网-朱老师( Peter Zhu) 时间:2019.10.17 晚 20:00-22:00
  137. 主题:如何高效的学习一门新技术? 具体内容:1. 2020了,
  138. 还有哪些值得学习的新技术? 2.如何高效的学习前端开发?
  139. 3.如果高效的学习PHP开发? 4.phpStudy V8 新功能介绍与演示
  140. 5.小皮面板功能介绍
  141. </p>
  142. <div>
  143. <span>初级</span>
  144. <span>6824次播放</span>
  145. </div>
  146. </div>
  147. </div>
  148. <div class="last-update">
  149. <div>
  150. <a href=""><img src="./imgs/web.jpg" alt="图片加载失败" /></a>
  151. </div>
  152. <div class="g">
  153. <a href=""><h3>从零开始到WEB响应式布局</h3></a>
  154. <p>
  155. 重点介绍了HTML、CSS、web布局前端核心技术,通过视频讲解,
  156. 了解可以利用HTML+CSS做什么,
  157. 有相关工具、后端语言,逻辑思维训练等知识点
  158. </p>
  159. <div>
  160. <span>初级</span>
  161. <span>29227次播放</span>
  162. </div>
  163. </div>
  164. </div>
  165. <div class="last-update">
  166. <div>
  167. <a href=""><img src="./imgs/php2.png" alt="图片加载失败" /></a>
  168. </div>
  169. <div class="g">
  170. <a href=""><h3>php快速操控Excel之PhpSpreadsheet</h3></a>
  171. <p>
  172. 老的PHPExcel已经停止更新了!
  173. 目前最新的是使用phpOffice插件PhpSpreadsheet,
  174. 用纯php编写的库,它提供了一组类,
  175. 允许您读取和写入不同的电子表格文件格式!
  176. php中文网欧阳克老师原创课程!注:php运行环境需要php7.1以上
  177. </p>
  178. <div>
  179. <span>中级</span>
  180. <span>8888次播放</span>
  181. </div>
  182. </div>
  183. </div>
  184. <h2 class="title">最新文章</h2>
  185. <div class="j">
  186. <div>
  187. <a href="">ps转化为智能对象有什么作用</a>
  188. <p>发布时间:2020-4-12</p>
  189. </div>
  190. <div>
  191. <a href=""><img src="./imgs/new-essay44.jpg" alt="" /></a>
  192. </div>
  193. </div>
  194. <div class="j">
  195. <div>
  196. <a href="">电脑win键在哪里</a>
  197. <p>发布时间:2020-4-12</p>
  198. </div>
  199. <div>
  200. <a href=""><img src="./imgs/new-essay3.jpg" alt="" /></a>
  201. </div>
  202. </div>
  203. <div class="j">
  204. <div>
  205. <a href="">mac如何升级系统版本</a>
  206. <p>发布时间:2020-4-12</p>
  207. </div>
  208. <div>
  209. <a href=""><img src="./imgs/apple.jpg" alt="" /></a>
  210. </div>
  211. </div>
  212. <div class="j">
  213. <div>
  214. <a href="">指令代码序列称为程序吗</a>
  215. <p>发布时间:2020-4-12</p>
  216. </div>
  217. <div>
  218. <a href=""><img src="./imgs/newessay-.jpg" alt="" /></a>
  219. </div>
  220. </div>
  221. </body>
  222. <div class="j">
  223. <div>
  224. <a href="">p日期转换成年月日格式的方法</a>
  225. <p>发布时间:2020-4-12</p>
  226. </div>
  227. <div>
  228. <a href=""><img src="./imgs/new-essay1.jpg" alt="" /></a>
  229. </div>
  230. </div>
  231. <div class="title3">
  232. <a href="">更多内容</a>
  233. </div>
  234. <h2 class="title">最新博文</h2>
  235. <div class="blog">
  236. <a href=""><h4>css3:细说选择器:简单选择器、上下文选择器、伪类选择器、其它选择器</h4></a></<a>
  237. <span>2020-14-12</span>
  238. </div>
  239. <div class="blog">
  240. <a href=""><h4>CSS 中各类选择器的属性及应用</h4></a></<a>
  241. <span>2020-14-12</span>
  242. </div>
  243. <div class="blog">
  244. <a href=""><h4>CSS3:弹性盒子flex布局</h4></a></<a>
  245. <span>2020-14-12</span>
  246. </div>
  247. <div class="blog">
  248. <a href=""><h4>flex容器中的主轴方向与项目换行缩写、主轴
  249. ,交叉轴和多行容器交叉轴项目对齐以及以及flex属性的缩写和案例
  250. </h4></a></<a>
  251. <span>2020-14-12</span>
  252. </div>
  253. <div class="blog">
  254. <a href=""><h4>Jquery+AJAX上传文件,无刷新上传并重命名文件</h4></a></<a>
  255. <span>2020-14-12</span>
  256. </div>
  257. <div class="title3">
  258. <a href="">更多内容</a>
  259. </div>
  260. <h2 class="title">最新问答</h2>
  261. <div class="blog">
  262. <a href=""><h4>css3:细说选择器:简单选择器、上下文选择器、伪类选择器、其它选择器</h4></a></<a>
  263. <span>2020-14-12</span>
  264. </div>
  265. <div class="blog">
  266. <a href=""><h4>CSS 中各类选择器的属性及应用</h4></a></<a>
  267. <span>2020-14-12</span>
  268. </div>
  269. <div class="blog">
  270. <a href=""><h4>CSS3:弹性盒子flex布局</h4></a></<a>
  271. <span>2020-14-12</span>
  272. </div>
  273. <div class="blog">
  274. <a href=""><h4>flex容器中的主轴方向与项目换行缩写、主轴
  275. ,交叉轴和多行容器交叉轴项目对齐以及以及flex属性的缩写和案例
  276. </h4></a></<a>
  277. <span>2020-14-12</span>
  278. </div>
  279. <div class="blog">
  280. <a href=""><h4>Jquery+AJAX上传文件,无刷新上传并重命名文件</h4></a></<a>
  281. <span>2020-14-12</span>
  282. </div>
  283. <div class="title3">
  284. <a href="">更多内容</a>
  285. </div>
  286. <footer>
  287. <a href="">
  288. <span class="iconfont">&#xe891;</span>
  289. <span>首页</span>
  290. </a>
  291. <a href="">
  292. <span class="iconfont">&#xe7aa;</span>
  293. <span>视频</span>
  294. </a>
  295. <a href="">
  296. <span class="iconfont">&#xe7e6;</span>
  297. <span>社区</span>
  298. </a>
  299. <a href="">
  300. <span class="iconfont">&#xe7a0;</span>
  301. <span>我的</span>
  302. </a>
  303. </footer>
  304. </body>
  305. </html>

css文件

  1. * {
  2. margin: 0px;
  3. padding: 0px;
  4. }
  5. html {
  6. width: 100vw;
  7. height: 100vh;
  8. font-size: 14px;
  9. font-family: Arial, Helvetica, sans-serif;
  10. }
  11. body {
  12. min-width: 360px;
  13. background-color: #edeff0;
  14. display: flex;
  15. flex-flow: column nowrap;
  16. }
  17. .iconfont {
  18. color: #ffffff;
  19. font-size: 30px;
  20. }
  21. body header {
  22. height: 40px;
  23. width: 100vw;
  24. background-color: #333;
  25. padding: 0 10px;
  26. position: fixed;
  27. top: 0px;
  28. width: 95vw;
  29. display: flex;
  30. justify-content: space-between;
  31. align-items: center;
  32. }
  33. header > a:first-of-type > img {
  34. width: 30px;
  35. border-radius: 50%;
  36. }
  37. header > a:last-of-type > img {
  38. width: 120px;
  39. }
  40. .carousel > img {
  41. margin-top: 40px;
  42. width: 100%;
  43. }
  44. .nav {
  45. height: 160px;
  46. display: flex;
  47. flex-flow: row wrap;
  48. padding: 10px 0;
  49. background-color: white;
  50. align-content: space-between;
  51. }
  52. .nav > .item {
  53. align-items: center;
  54. display: flex;
  55. flex-flow: column nowrap;
  56. flex: 1 0 25vw;
  57. }
  58. .nav a {
  59. text-align: center;
  60. }
  61. .nav img {
  62. width: 50%;
  63. }
  64. /* 标题 */
  65. h2 {
  66. color: #888;
  67. height: 50px;
  68. display: flex;
  69. flex-flow: column nowrap;
  70. justify-content: end;
  71. padding-left: 10px;
  72. }
  73. /* 推荐课程 */
  74. .one {
  75. display: flex;
  76. flex-flow: row nowrap;
  77. justify-content: space-between;
  78. padding: 10px;
  79. box-sizing: border-box;
  80. width: 100vw;
  81. display: flex;
  82. }
  83. .one img {
  84. width: 96%;
  85. }
  86. .two {
  87. margin: 10px 10px;
  88. padding: 10px;
  89. background-color: white;
  90. display: flex;
  91. flex-flow: row nowrap;
  92. }
  93. .two img {
  94. width: 138px;
  95. height: 80px;
  96. }
  97. .two-one > a {
  98. padding: 0 10px;
  99. display: flex;
  100. flex-flow: column nowrap;
  101. text-decoration: none;
  102. font-size: 16px;
  103. color: gray;
  104. }
  105. a:hover {
  106. color: lightcoral;
  107. }
  108. .two-two {
  109. padding: 10px;
  110. font-size: 12px;
  111. }
  112. .two-two > span:first-of-type {
  113. border: 1px solid black;
  114. color: white;
  115. background-color: black;
  116. border-radius: 40%;
  117. }
  118. .last-update {
  119. padding: 10px;
  120. margin: 10px;
  121. background-color: white;
  122. display: flex;
  123. flex-flow: row nowrap;
  124. justify-content: space-between;
  125. }
  126. .last-update img {
  127. width: 138px;
  128. height: 80px;
  129. }
  130. .g {
  131. padding: 0 10px;
  132. width: 195px;
  133. height: 80px;
  134. display: flex;
  135. flex-flow: column nowrap;
  136. justify-content: space-between;
  137. }
  138. .g a {
  139. text-decoration: none;
  140. }
  141. .g h3 {
  142. color: gray;
  143. white-space: nowrap;
  144. overflow: hidden;
  145. text-overflow: ellipsis;
  146. }
  147. .g p {
  148. color: gray;
  149. font-size: 10px;
  150. white-space: nowrap;
  151. overflow: hidden;
  152. text-overflow: ellipsis;
  153. }
  154. .g div {
  155. color: gray;
  156. padding-right: 10px;
  157. font-size: 12px;
  158. display: flex;
  159. flex-flow: row nowrap;
  160. justify-content: space-between;
  161. }
  162. .g > div > span:first-of-type {
  163. border: 1px solid;
  164. border-radius: 40%;
  165. color: white;
  166. background-color: black;
  167. }
  168. .j {
  169. width: 90vw;
  170. padding: 10px;
  171. margin: 10px;
  172. background-color: white;
  173. color: gray;
  174. display: flex;
  175. flex-flow: row nowrap;
  176. justify-content: space-between;
  177. }
  178. .j div:first-of-type {
  179. display: flex;
  180. flex-flow: column nowrap;
  181. justify-content: space-around;
  182. }
  183. .j img {
  184. width: 100px;
  185. height: 65px;
  186. }
  187. .j a {
  188. color: gray;
  189. text-decoration: none;
  190. }
  191. .j p {
  192. font-size: 12px;
  193. }
  194. .title3 {
  195. margin: 10px;
  196. padding: 5px;
  197. font-size: 16px;
  198. text-align: center;
  199. background-color: white;
  200. }
  201. .title3 > a {
  202. text-decoration: none;
  203. color: gray;
  204. }
  205. .blog {
  206. width: 90vw;
  207. color: gray;
  208. margin: 10px;
  209. padding: 10px;
  210. background-color: white;
  211. display: flex;
  212. flex-flow: row nowrap;
  213. justify-content: space-between;
  214. }
  215. .blog a {
  216. color: gray;
  217. text-decoration: none;
  218. }
  219. .blog h4 {
  220. width: 230px;
  221. white-space: nowrap;
  222. overflow: hidden;
  223. text-overflow: ellipsis;
  224. }
  225. footer {
  226. background-color: #edeff0;
  227. color: #666;
  228. height: 60px;
  229. border: 1px solid lightgray;
  230. position: fixed;
  231. bottom: 0px;
  232. width: 100vw;
  233. display: flex;
  234. flex-flow: row nowrap;
  235. justify-content: space-evenly;
  236. }
  237. footer a {
  238. color: #666;
  239. text-decoration: none;
  240. /* margin: 5px 0px; */
  241. display: flex;
  242. flex-flow: column nowrap;
  243. /* justify-content: center; */
  244. align-items: center;
  245. }
  246. footer > a > span:first-of-type {
  247. font-size: 35px;
  248. color: #666;
  249. }
  250. footer > a > span:last-of-type {
  251. font-size: 10px;
  252. }

总结


声明:本文内容转载自脚本之家,由网友自发贡献,版权归原作者所有,如您发现涉嫌抄袭侵权,请联系admin@php.cn 核实处理。
全部评论
文明上网理性发言,请遵守新闻评论服务协议