

    * {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}
a {
  color: #fff;
  text-decoration: none;
}
.main {
  width: 800px;
  height: 300px;
  margin: 0 auto;
}
.item {
  width: 18%;
  height: 144px;
  background-color: red;
  margin: 5px;
  float: left;
  border-radius: 8px;
  position: relative;
  overflow: hidden; /* 确保超出部分被隐藏 */
}
.item p {
  position: absolute;
  bottom: 0;
  text-align: center;
  width: 100%;
  height: 50px;
  line-height: 50px;
  background-color: rgba(80, 80, 80, 0.5);
}
.item img {
  width: 100%;
  height: 100%;
  border-radius: 8px;
}
.item .sp {
  width: 100%;
  height: 80px;
  object-fit: cover;
  position: absolute;
  bottom: -80px; /* 初始位置在底部之外 */
  left: 0;
  transition: bottom 0.3s ease; /* 添加过渡效果 */
  border-radius: 0;
}

.item:hover .sp {
  bottom: 0; /* 鼠标移入时将图片移动到可见位置 */
}

    