所以我试图在文本的左上角和右下角放置apostrow img,但是Firefox无法与我合作:

我有跨度的文本,并且在之前和之后放置了img

.komentarz-main .content span{
position: relative;
height: 100%;
}

.komentarz-main .content span:after{
display: block;
content: '';
position: absolute;
width: 11px;
height: 10px;
background-image: url("../img/cudzyslow.png");
background-size: contain;
background-repeat: no-repeat;
right: -15px;
bottom: 0px;
}


Firefox的结果:
html - 绝对位置,底部0,Firefox不起作用-LMLPHP

镀铬结果:
html - 绝对位置,底部0,Firefox不起作用-LMLPHP

有任何想法吗 ?

最佳答案

尝试以下代码,只需替换您的CSS代码



.komentarz-main .content span{
    position: relative;
    height: 100%;
    display: inline-block;
}

.komentarz-main .content span:after{
    display: inline-block;
    content: '';
    position: relative;
    width: 11px;
    height: 10px;
    background-image: url(../img/cudzyslow.png);
    background-size: contain;
    background-repeat: no-repeat;
    bottom: 0px;
}

<div class="komentarz-main">
<div class="content">
<span>Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</span>
</div>
</div>

关于html - 绝对位置,底部0,Firefox不起作用,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/45140021/

10-13 07:48