.nav-li::after {
  content: "";
  position: absolute;
  z-index: 2;
  background-color: inherit;
  width: 100%;
  height: 100%;
  left: 0;
  bottom: -10%;
  border-radius: 10rpx;
  opacity: 0.2;
  transform: scale(0.9, 0.9);
}

:after伪元素 在.nav-li后叠加一个宽高都为100%的视图,
inherit背景颜色继承父视图颜色

相关文章:

  • 2021-11-27
  • 2022-12-23
  • 2021-11-26
  • 2021-05-27
  • 2021-11-25
  • 2022-12-23
  • 2022-12-23
  • 2021-07-03
猜你喜欢
  • 2021-09-05
  • 2021-09-23
  • 2022-12-23
  • 2021-12-26
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案