博主信息
博文 38
粉丝 0
评论 0
访问量 31629
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
仿PHP中文网的热门推荐栏目
一个好人
原创
728人浏览过
  1. <h2>热门推荐</h2>
  2. <div class="courses-list">
  3. <div class="course">
  4. <a href="">
  5. <img src="C:\Users\hao_z\Desktop\php\static\picture\hot_courses\hot_course_1.png" alt="">
  6. </a>
  7. <div class="desc">
  8. <div class="title">
  9. <small class="tag chu">初级</small>
  10. <a href="">小白拯救者: PHP7基础语法快速预览</a>
  11. </div>
  12. <div class="other">
  13. <span>88787次学习</span>
  14. <!-- <div class="shoucang">
  15. <input type="checkbox" name="shoucang" id="shoucang">
  16. <label for="shoucang">收藏</label>
  17. </div> -->
  18. <a href="" class="shoucang">☆ 收藏</a>
  19. </div>
  20. </div>
  21. </div>
  1. body{
  2. background-color: #efefef;
  3. padding: 2px;
  4. }
  5. body a{
  6. text-decoration: none;
  7. color: #555;
  8. font-size: small;
  9. }
  10. body a:hover{
  11. color: red;
  12. }
  13. .hot_courses{
  14. width: 1020px;
  15. /* border: 1px solid black; */
  16. /* 居中 */
  17. margin: 0 auto;
  18. }
  19. .hot_courses .courses-list{
  20. display: grid;
  21. grid-template-columns: repeat(5, 1fr);
  22. gap: 30px 10px;
  23. }
  24. .courses-list .course{
  25. background-color: white;
  26. border-radius: 5px;
  27. /* 溢出隐藏 */
  28. overflow: hidden;
  29. }
  30. .chu{
  31. color: #00aaff;
  32. background-color: hsla(196, 79%, 94%, 0.782);
  33. }
  34. .zhong{
  35. color: red;
  36. background-color: rgb(241, 204, 190);
  37. /* opacity: 40%; */
  38. }
  39. .hot_courses .courses-list img{
  40. /* 100%填充 */
  41. width: 100%;
  42. border-radius: 5px 5px 0 0;
  43. }
  44. .hot_courses .courses-list img:hover{
  45. transform: scale(1.1);
  46. transition: 0.3s;
  47. }
  48. .hot_courses .courses-list .desc{
  49. padding: 15px;
  50. }
  51. .hot_courses .courses-list .desc .tag{
  52. border-radius: 2px;
  53. padding: 2px 5px;
  54. font-size: x-small;
  55. }
  56. .hot_courses .courses-list .title>a{
  57. font-weight: 500;
  58. }
  59. .hot_courses .courses-list .title{
  60. height: 40px;
  61. overflow: hidden;
  62. }
  63. .hot_courses .courses-list .desc .other{
  64. color: #aaa;
  65. font-size: x-small;
  66. display: flex;
  67. place-content: space-between;
  68. margin-top: 10px;
  69. }
  70. .hot_courses .courses-list .desc .other>a{
  71. color: #aaa;
  72. font-size: x-small;
  73. }

仿PHP中文网热门推荐

总结:

能看出来的效果基本都放上了,还有几点不足:收藏应该不是a标签,效果像CheckBox,但用CheckBox做不出来一样的效果;颜色不好调,应该是没掌握技巧。

批改老师:PHPzPHPz

批改状态:合格

老师批语:
本博文版权归博主所有,转载请注明地址!如有侵权、违法,请联系admin@php.cn举报处理!
全部评论 文明上网理性发言,请遵守新闻评论服务协议
0条评论
作者最新博文
关于我们 免责申明 意见反馈 讲师合作 广告合作 最新更新 English
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送
PHP中文网APP
随时随地碎片化学习
PHP中文网抖音号
发现有趣的

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号

  • 登录PHP中文网,和优秀的人一起学习!
    全站2000+教程免费学