Blogger Information
Blog 10
fans 0
comment 1
visits 3171
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
仿写PHP中文网首页:最新课程
P粉753609736
Original
441 people have browsed it

html代码

  1. <div class="new-courser">
  2. <div class="top">
  3. <h3>最新课程</h3>
  4. <a href="">更多></a>
  5. </div>
  6. <ul class="courses">
  7. <li class="item">
  8. <a href=""><img src="https://img.php.cn/upload/course/000/000/068/63e202276944f543.jpg" alt=""></a>
  9. <div class="detail">
  10. <div>
  11. <span>初级</span>
  12. <a href="" target="_blank"> 8 课程精讲(台湾同胞版)</a>
  13. </div>
  14. <div class="desc">
  15. <span>111学习</span>
  16. <span>收藏</span>
  17. </div>
  18. </div>
  19. </li>
  20. <li class="item">
  21. <a href=""><img src="https://img.php.cn/upload/course/000/000/068/63e202276944f543.jpg" alt=""></a>
  22. <div class="detail">
  23. <div>
  24. <span>初级</span>
  25. <a href="" target="_blank"> 8 课程精讲(台湾同胞版)</a>
  26. </div>
  27. <div class="desc">
  28. <span>111学习</span>
  29. <span>收藏</span>
  30. </div>
  31. </div>
  32. </li>
  33. <li class="item">
  34. <a href=""><img src="https://img.php.cn/upload/course/000/000/068/63e202276944f543.jpg" alt=""></a>
  35. <div class="detail">
  36. <div>
  37. <span>初级</span>
  38. <a href="" target="_blank"> 8 课程精讲(台湾同胞版)</a>
  39. </div>
  40. <div class="desc">
  41. <span>111学习</span>
  42. <span>收藏</span>
  43. </div>
  44. </div>
  45. </li>
  46. <li class="item">
  47. <a href=""><img src="https://img.php.cn/upload/course/000/000/068/63e202276944f543.jpg" alt=""></a>
  48. <div class="detail">
  49. <div>
  50. <span>初级</span>
  51. <a href="" target="_blank"> 8 课程精讲(台湾同胞版)</a>
  52. </div>
  53. <div class="desc">
  54. <span>111学习</span>
  55. <span>收藏</span>
  56. </div>
  57. </div>
  58. </li>
  59. <li class="item">
  60. <a href=""><img src="https://img.php.cn/upload/course/000/000/068/63e202276944f543.jpg" alt=""></a>
  61. <div class="detail">
  62. <div>
  63. <span>初级</span>
  64. <a href="" target="_blank"> 8 课程精讲(台湾同胞版)</a>
  65. </div>
  66. <div class="desc">
  67. <span>111学习</span>
  68. <span>收藏</span>
  69. </div>
  70. </div>
  71. </li>
  72. <li class="item">
  73. <a href=""><img src="https://img.php.cn/upload/course/000/000/068/63e202276944f543.jpg" alt=""></a>
  74. <div class="detail">
  75. <div>
  76. <span>初级</span>
  77. <a href="" target="_blank"> 8 课程精讲(台湾同胞版)</a>
  78. </div>
  79. <div class="desc">
  80. <span>111学习</span>
  81. <span>收藏</span>
  82. </div>
  83. </div>
  84. </li>
  85. <li class="item">
  86. <a href=""><img src="https://img.php.cn/upload/course/000/000/068/63e202276944f543.jpg" alt=""></a>
  87. <div class="detail">
  88. <div>
  89. <span>初级</span>
  90. <a href="" target="_blank"> 8 课程精讲(台湾同胞版)</a>
  91. </div>
  92. <div class="desc">
  93. <span>111学习</span>
  94. <span>收藏</span>
  95. </div>
  96. </div>
  97. </li>
  98. <li class="item">
  99. <a href=""><img src="https://img.php.cn/upload/course/000/000/068/63e202276944f543.jpg" alt=""></a>
  100. <div class="detail">
  101. <div>
  102. <span>初级</span>
  103. <a href="" target="_blank"> 8 课程精讲(台湾同胞版)</a>
  104. </div>
  105. <div class="desc">
  106. <span>111学习</span>
  107. <span>收藏</span>
  108. </div>
  109. </div>
  110. </li>
  111. <li class="item">
  112. <a href=""><img src="https://img.php.cn/upload/course/000/000/068/63e202276944f543.jpg" alt=""></a>
  113. <div class="detail">
  114. <div>
  115. <span>初级</span>
  116. <a href="" target="_blank"> 8 课程精讲(台湾同胞版)</a>
  117. </div>
  118. <div class="desc">
  119. <span>111学习</span>
  120. <span>收藏</span>
  121. </div>
  122. </div>
  123. </li>
  124. <li class="item">
  125. <a href=""><img src="https://img.php.cn/upload/course/000/000/068/63e202276944f543.jpg" alt=""></a>
  126. <div class="detail">
  127. <div>
  128. <span>初级</span>
  129. <a href="" target="_blank"> 8 课程精讲(台湾同胞版)</a>
  130. </div>
  131. <div class="desc">
  132. <span>111学习</span>
  133. <span>收藏</span>
  134. </div>
  135. </div>
  136. </li>

css代码

  1. ```css
  • {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    }
    body{
    background-color: #aac7db;
    }
    .new-courses {
    width: 100px;
    margin: auto;
    display: grid;
    grid-template-rows: 75px 600px;
    grid-template-columns: repeat(1, 1fr);
    gap:10px;
    }

    .top {
    width: 1000px;
    height: 75px;
    margin: auto;
    line-height: 75px;
    display: grid;
    grid-template-rows: repeat(1, 1fr);
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    }

    .top a {
    place-self: center end;
    display:inline-block;
    width: 80px;
    height: 75px;
    text-align: center;
    line-height: 75px;
    text-decoration: none;
    background-color: white;
    border-radius: 10px;
    }

    .top a:hover {
    cursor: pointer;
    background-color: red;
    border-radius: 10px;
    color: white;
    transition: 0.5s;
    text-decoration: none;
    background-color: red;
    border-radius: 10px;
    }

    .courses{
    display: grid;
    grid-template-rows: repeat(2,1fr);
    grid-template-columns: repeat(5,1fr);
    gap: 30px 20px;
    }

    .courses .detail{
    padding:10px;
    border-radius: 10px;
    background-color: white;
    }

    .courses li.item{
    height: 250px;
    list-style: none;
    border-radius: 10px;
    background-color:white;
    display: flex;
    flex-flow: column nowrap;
    justify-content: center;
    align-items: center;
    padding: 10px;
    margin-bottom: 10px;
    }

    .courses li.item a{
    display: block;
    border-radius: 10px 10px 0 0;
    overflow: hidden;
    }

.courses li.item a img{
width: 224px;
object-fit: fill;
overflow: hidden;
}

.courses li.item a img:hover {
transform: scale(1.1);
transition: 0.5s;
}

.courses li.item .detail div {
height: 75px;
}

.courses li.item .detail div:first-child span {
display: inline-block;
padding: 2px 4px;
background-color: tomato;
font-size: 10px;
font-size:small;
color: white;
border-radius: 10px;
margin-right: 5px;
margin-left: 5px;
text-transform: uppercase;
}

.courses li.item .detail a {
display: inline;
font-size: 14px;
text-decoration: none;
}

.courses li.item .detail .desc {
height: 10px;
display: flex;
flex-flow: row nowrap;
place-content: space-between;
align-items: center;
font-size: 14px;
font-size:small;
color: rgb(11, 10, 10);
margin-top: 5px;
margin-bottom: 5px;
margin-right: 5px;
margin-left: 5px;
text-transform: uppercase;
font-weight: bold;
}
```

  1. </div>
Correcting teacher:PHPzPHPz

Correction status:qualified

Teacher's comments:代码内容可以使用代码块包裹
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post