2017-07-17 48 views
0

所以我尝试把apostrow在左上角和文本的右下角的img,但Firefox不与我合作:位置绝对底部0,火狐不灵

我有跨度的文字,并把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

铬结果: enter image description here

有什么想法?

回答

1

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

+0

这解决了我的问题,现在firefox和chrome配合:)谢谢 当然需要设置之前类似这个 – Edgarth

+0

欢迎@Edgarth :) – Santhoshkumar

0
.komentarz-main .content span{ 
display:inline-block; 
} 
+0

它不再坚持在文本:溢出它或进行大的白色空间,我不知道它的文字的大小 – Edgarth

+0

它不会改变。将此样式添加到'height:100%;位置:相对;' – dsb

相关问题