当我在一个overflow-y: scroll上使用div时,它的子div的::after元素会显示在某个元素下面。当我不使用overflow-y: scroll时,除了滚动条不再显示之外,一切看起来都很完美。
我已经在::after元素上尝试过“z索引”,但是它没有改变任何东西。
#servers-cont {
flex: 0 0 120px;
}
/* Uncomment to display the scrollbar, but then ".server-circle:hover:after" is not completely visible */
/*
#
我如何使中心对齐我的伪元素之后?类似边距:0自动;对于块元素。
<div>
This is test text. This is test text. This is test text.
</div>
CSS代码:
div:after {
position: absolute;
display: block;
content:"";
border-color: #EAB920 transparent transparent transparent;
border-style: solid;