当前位置: 代码迷 >> 综合 >> ::before 不生效
  详细解决方案

::before 不生效

热度:45   发布时间:2024-01-21 01:17:29.0
.page3 .tab-wrap .tab_all .tab-item::before{content: '';width: 1px;height: 23px;background: url(../images/li_line.png) no-repeat;background-size: 100% 100%;position: absolute;right: 0;top: 0;
}

::before 只有一个

原因:父元素没加 相对定位 position: relative;

  相关解决方案