博客列表 >仿PHP中文网的“热门推荐”

仿PHP中文网的“热门推荐”

至亲难忘
至亲难忘原创
2023年03月22日 10:42:22247浏览
  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. <title>热门推荐</title>
  8. <link rel="stylesheet" href="course.css">
  9. </head>
  10. <body>
  11. <div class="latest-courses">
  12. <h2>热门推荐</h2>
  13. <div class="courses-first">
  14. <!-- 课程 -->
  15. <div class="course">
  16. <!-- 图片 -->
  17. <a>
  18. <img src="img/01.jpeg">
  19. </a>
  20. <!-- 课程描述 -->
  21. <div class="miaosu">
  22. <!-- 标题 -->
  23. <div class="title">
  24. <small class="tag">初级</small>
  25. <a>php8,我来也</a>
  26. </div>
  27. </div>
  28. <!-- 其他 -->
  29. <div class="other">
  30. <span>24323223次学习</span>
  31. <span>收藏</span>
  32. </div>
  33. </div>
  34. <div class="course">
  35. <!-- 图片 -->
  36. <a>
  37. <img src="img/02.png">
  38. </a>
  39. <!-- 课程描述 -->
  40. <div class="miaosu">
  41. <!-- 标题 -->
  42. <div class="title">
  43. <small class="tag">初级</small>
  44. <a>php8,我来也</a>
  45. </div>
  46. </div>
  47. <!-- 其他 -->
  48. <div class="other">
  49. <span>24323223次学习</span>
  50. <span>收藏</span>
  51. </div>
  52. </div>
  53. <div class="course">
  54. <!-- 图片 -->
  55. <a>
  56. <img src="img/03.jpeg">
  57. </a>
  58. <!-- 课程描述 -->
  59. <div class="miaosu">
  60. <!-- 标题 -->
  61. <div class="title">
  62. <small class="tag">初级</small>
  63. <a>php8,我来也</a>
  64. </div>
  65. </div>
  66. <!-- 其他 -->
  67. <div class="other">
  68. <span>24323223次学习</span>
  69. <span>收藏</span>
  70. </div>
  71. </div>
  72. <div class="course">
  73. <!-- 图片 -->
  74. <a>
  75. <img src="img/04.jpeg">
  76. </a>
  77. <!-- 课程描述 -->
  78. <div class="miaosu">
  79. <!-- 标题 -->
  80. <div class="title">
  81. <small class="tag">初级</small>
  82. <a>php8,我来也</a>
  83. </div>
  84. </div>
  85. <!-- 其他 -->
  86. <div class="other">
  87. <span>24323223次学习</span>
  88. <span>收藏</span>
  89. </div>
  90. </div>
  91. <div class="course">
  92. <!-- 图片 -->
  93. <a>
  94. <img src="img/05.jpeg">
  95. </a>
  96. <!-- 课程描述 -->
  97. <div class="miaosu">
  98. <!-- 标题 -->
  99. <div class="title">
  100. <small class="tag">初级</small>
  101. <a>php8,我来也</a>
  102. </div>
  103. </div>
  104. <!-- 其他 -->
  105. <div class="other">
  106. <span>24323223次学习</span>
  107. <span>收藏</span>
  108. </div>
  109. </div>
  110. <div class="course">
  111. <!-- 图片 -->
  112. <a>
  113. <img src="img/06.png">
  114. </a>
  115. <!-- 课程描述 -->
  116. <div class="miaosu">
  117. <!-- 标题 -->
  118. <div class="title">
  119. <small class="tag">初级</small>
  120. <a>php8,我来也</a>
  121. </div>
  122. </div>
  123. <!-- 其他 -->
  124. <div class="other">
  125. <span>24323223次学习</span>
  126. <span>收藏</span>
  127. </div>
  128. </div>
  129. <div class="course">
  130. <!-- 图片 -->
  131. <a>
  132. <img src="img/07.jpeg">
  133. </a>
  134. <!-- 课程描述 -->
  135. <div class="miaosu">
  136. <!-- 标题 -->
  137. <div class="title">
  138. <small class="tag">初级</small>
  139. <a>php8,我来也</a>
  140. </div>
  141. </div>
  142. <!-- 其他 -->
  143. <div class="other">
  144. <span>24323223次学习</span>
  145. <span>收藏</span>
  146. </div>
  147. </div>
  148. <div class="course">
  149. <!-- 图片 -->
  150. <a>
  151. <img src="img/08.png">
  152. </a>
  153. <!-- 课程描述 -->
  154. <div class="miaosu">
  155. <!-- 标题 -->
  156. <div class="title">
  157. <small class="tag">初级</small>
  158. <a>php8,我来也</a>
  159. </div>
  160. </div>
  161. <!-- 其他 -->
  162. <div class="other">
  163. <span>24323223次学习</span>
  164. <span>收藏</span>
  165. </div>
  166. </div>
  167. <div class="course">
  168. <!-- 图片 -->
  169. <a>
  170. <img src="img/09.jpeg">
  171. </a>
  172. <!-- 课程描述 -->
  173. <div class="miaosu">
  174. <!-- 标题 -->
  175. <div class="title">
  176. <small class="tag">初级</small>
  177. <a>php8,我来也</a>
  178. </div>
  179. </div>
  180. <!-- 其他 -->
  181. <div class="other">
  182. <span>24323223次学习</span>
  183. <span>收藏</span>
  184. </div>
  185. </div>
  186. <div class="course">
  187. <!-- 图片 -->
  188. <a>
  189. <img src="img/10.jpeg">
  190. </a>
  191. <!-- 课程描述 -->
  192. <div class="miaosu">
  193. <!-- 标题 -->
  194. <div class="title">
  195. <small class="tag">初级</small>
  196. <a>php8,我来也</a>
  197. </div>
  198. </div>
  199. <!-- 其他 -->
  200. <div class="other">
  201. <span>24323223次学习</span>
  202. <span>收藏</span>
  203. </div>
  204. </div>
  205. </div>
  206. </div>
  207. </body>
  208. </html>
  209. body {
  210. background-color: #efefef;
  211. }
  212. body a{
  213. text-decoration: none;
  214. color: #555;
  215. font-size: small;
  216. }
  217. body a:hover{
  218. color: red;
  219. }
  220. .latest-courses {
  221. width: 1020px;
  222. margin: 0;
  223. }
  224. .latest-courses .courses-first {
  225. display: grid;
  226. grid-template-columns: repeat(5,1fr);
  227. gap: 30px 10px;
  228. }
  229. .latest-courses .courses-first .course img{
  230. width: 100%;
  231. border-radius: 5px 5px 0 0;
  232. }
  233. .latest-courses .courses-first .course img:hover{
  234. transform: scale(1.1);
  235. transition: 0.4s;
  236. }
  237. .latest-courses .courses-first .course{
  238. background-color: #fff;
  239. border-radius: 5px;
  240. overflow: hidden;
  241. }
  242. .latest-courses .courses-first .course .miaosu{
  243. padding: 15px;
  244. display: grid;
  245. gap: 10px;
  246. }
  247. .latest-courses .courses-first .course .miaosu .title .tag{
  248. color: red;
  249. background-color: bisque;
  250. border-radius: 2px;
  251. padding: 2px 4px;
  252. font-size: x-small;
  253. }
  254. .latest-courses .courses-first .course .other{
  255. color: #aaa;
  256. font-size: small;
  257. display: flex;
  258. place-content:space-between;
  259. }

热门推荐

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