2017-07-17 75 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

相關問題