为什么小程序不能渲染last-chid伪类

发布于 7 年前作者 jxu8567 次浏览最后编辑 7 年前来自 ask

.comment::after{

  content: “”;

  display: block;

  position: absolute;

  bottom: 0;

  left: 0;

  right: 0;

  height: 1px;

  border-bottom:1rpx solid #ddd;

  margin-left: 15px;

}

.comment:last-child::after{

  display: none!important;

}

 没有效果

1 回复
tianjie
tianjie1 楼5 年前

哈哈哈,我也遇到过,但是只是在关联元素有展示隐藏时会出问题,全程都展示的话可以用,后来用js加样式糊弄了