gpt4 book ai didi

html - 绝对位置,底部 0,firefox 不工作

转载 作者:太空宇宙 更新时间:2023-11-04 08:26:21 24 4
gpt4 key购买 nike

所以我试图在文本的左上角和右下角放置 apostrow img,但是 firefox 不配合我:

我在 span 中有文本,并在之前和之后放置 imgs

.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;
}

火狐浏览器结果: enter image description here

Chrome 效果: enter image description here

有什么想法吗?

最佳答案

尝试下面的代码,只需替换你的 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/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com