after伪类元素设置了content,border,background-color,display属性,可是当position为absolute的时候就是无法显示,在调试工具中是能看到这个元素存在的,但是就是无法显示,当把position属性改为fixed的时候就ok了,请问是什么原因?
上图为position:absolute,下图为position:fixed;
代码:
.seckilling .time-box .box.active::after{
content: "asdf";
font-size: 20px;
position: absolute;
z-index: 1000;
left: 200px;
bottom: 0;
display: block;
width: 10px;
height: 10px;
border: 1px solid red;
background-color: rgb(255, 0, 0);
color: rgb(255, 0, 0);
font-size: 20px;
transform: translateY(100%);
}
看看你的.box.active::after基于定位的父类是否设置了overflow: hidden;,这会让.box.active::after显示不了的

应该是这里有设置了overflow: hidden;的元素