博客列表 >图文列表与课程表

图文列表与课程表

喜
原创
2022年07月07日 11:50:12310浏览

1.图文列表

  1. <ul>
  2. <li>
  3. <div class="img">
  4. <a href="#"><img src="https://img.php.cn/upload/course/000/000/068/625e52df2dd4f914.jpg" alt=""></a>
  5. <p class="dw">公益直播</p>
  6. </div>
  7. <h3>
  8. <a href="#">公益直播:PHP入门到实战--实现邮箱验证(队列发送邮件)</a>
  9. </h3>
  10. <p><span class="one">精彩回放</span><span class="two"><i>11291</i>人感兴趣</span></p>
  11. </li>
  12. <li>
  13. <div class="img">
  14. <a href="#"><img src="https://img.php.cn/upload/course/000/000/001/624e4c82a65d0931.jpg" alt=""></a>
  15. <p class="dw">直播班</p>
  16. </div>
  17. <h3>
  18. <a href="#">第二期_大前端线上班</a>
  19. </h3>
  20. <p><span class="one">精彩回放</span><span class="two"><i>8948</i>人感兴趣</span></p>
  21. </li>
  22. <li>
  23. <div class="img">
  24. <a href="#"><img src="https://img.php.cn/upload/course/000/000/001/6296df1d179f3127.png" alt=""></a>
  25. <p class="dw">直播班</p>
  26. </div>
  27. <h3>
  28. <a href="#">第二十期_前端开发</a>
  29. </h3>
  30. <p><span class="one">精彩回放</span><span class="two"><i>3483</i>人感兴趣</span></p>
  31. </li>
  32. </ul>
  1. body{
  2. background-color: rgb(241, 239, 239);
  3. }
  4. *{
  5. margin: 0;
  6. padding: 0;
  7. box-sizing: border-box;
  8. }
  9. i{
  10. font-style: normal;
  11. }
  12. li{
  13. height: 275px;
  14. list-style: none;
  15. background-color: #fff;
  16. border-radius: 10px;
  17. overflow: hidden;
  18. }
  19. a{
  20. text-decoration: none;
  21. color: #333;
  22. }
  23. ul{
  24. display: grid;
  25. grid-template-columns: repeat(3,1fr);
  26. gap: 0 20px;
  27. width: 890px;
  28. margin: 50px auto;
  29. }
  30. .img a{
  31. display: block;
  32. height: 160px;
  33. transition: all 0.2s;
  34. }
  35. .img{
  36. position: relative;
  37. overflow: hidden;
  38. }
  39. .dw{
  40. position: absolute;
  41. right: 8px;
  42. top: 8px;
  43. height: 22px;
  44. background: linear-gradient(to top, rgb(235, 196, 134), rgba(250, 228, 193));
  45. padding: 0px 3px 0px 3px;
  46. border-radius: 3px;
  47. color: #93652a;
  48. font-size: 12px;
  49. line-height: 22px;
  50. }
  51. img{
  52. border-radius: 8px 8px 0 0;
  53. width: 100%;
  54. }
  55. a:hover{
  56. transform: scale(1.1);
  57. }
  58. h3{
  59. height: 42px;
  60. font-size: 16px;
  61. margin: 10px 15px ;
  62. font-weight: normal;
  63. }
  64. h3:hover a{
  65. color: red;
  66. }
  67. p{
  68. display: flex;
  69. justify-content: space-between;
  70. padding: 10px 15px;;
  71. font-size: 14px;
  72. }
  73. .one{
  74. color: #666;
  75. }
  76. .two{
  77. color: #b7b7b7;
  78. }

2.课程表

  1. <table>
  2. <caption>课程表</caption>
  3. <thead>
  4. <tr class="two">
  5. <th></th>
  6. <th>星期一</th>
  7. <th>星期二</th>
  8. <th>星期三</th>
  9. <th>星期四</th>
  10. <th>星期五</th>
  11. <div class="one">
  12. </div>
  13. </tr>
  14. </thead>
  15. <tbody>
  16. <tr>
  17. <td>1</td>
  18. <td>数学</td>
  19. <td>语文</td>
  20. <td>数学</td>
  21. <td>语文</td>
  22. <td rowspan="2">语文</td>
  23. </tr>
  24. <tr>
  25. <td>2</td>
  26. <td>语文</td>
  27. <td>数学</td>
  28. <td>语文</td>
  29. <td>数学</td>
  30. </tr>
  31. <tr>
  32. <td>3</td>
  33. <td>体育</td>
  34. <td>语文</td>
  35. <td rowspan="2">品德</td>
  36. <td>语文</td>
  37. <td rowspan="2">美术</td>
  38. </tr>
  39. <tr>
  40. <td>4</td>
  41. <td>体育</td>
  42. <td>语文</td>
  43. <td>语文</td>
  44. </tr>
  45. <tr>
  46. <td colspan="6">午休</td>
  47. </tr>
  48. <tr>
  49. <td>5</td>
  50. <td>体育</td>
  51. <td>语文</td>
  52. <td>品德</td>
  53. <td>语文</td>
  54. <td>美术</td>
  55. </tr>
  56. </tbody>
  57. </table>
  1. <style>
  2. caption{
  3. margin-bottom: 10px;
  4. color: hotpink;
  5. font-size: 20px;
  6. font-weight: bold;
  7. }
  8. table,th,td{
  9. text-align: center;
  10. border: 1px solid orange;
  11. border-collapse: collapse;
  12. }
  13. th,td{
  14. width: 50px;
  15. height: 50px;
  16. }
  17. th{
  18. color: orange;
  19. }
  20. .one{
  21. position: absolute;
  22. top: 44px;
  23. width: 0;
  24. height: 0;
  25. border-left: 27px solid hotpink;
  26. border-right: 27px solid orange;
  27. border-bottom: 27px solid hotpink;
  28. border-top: 27px solid orange;
  29. }
  30. .two{
  31. position: relative;
  32. }
  33. </style>
声明:本文内容转载自脚本之家,由网友自发贡献,版权归原作者所有,如您发现涉嫌抄袭侵权,请联系admin@php.cn 核实处理。
全部评论
文明上网理性发言,请遵守新闻评论服务协议