通过伪类元素:after为其添加样式,用transform:scaleY令其在垂直方向缩小0.5倍

.div:after{
  height: 1px;
  transform: scaleY(0.5);
  transform-origin: 50% 100%; // 要指定origin值, 要不然会模糊
  content: "";
  position: absolute;
  width: 100%;
  left: 0;
  bottom: 0;
  background: red;
}

相关文章:

  • 2021-04-15
  • 2021-09-03
  • 2022-12-23
  • 2022-12-23
  • 2021-10-17
  • 2022-02-19
猜你喜欢
  • 2021-11-29
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-19
  • 2022-12-23
相关资源
相似解决方案