2015-07-04 43 views
1

我在this中使用僞元素後向前箭頭。該代碼適用於Google Chrome,但適用於Firefox或Internet Explorer,因此不會導致網頁佈局扭曲。特別是這一節一連串的火災。該僞元素在該部分的標題下使用,並且是在虛線之後調用向前指向箭頭的那個。CSS僞:在Chrome中完美工作之後,但在Firefox或Internet Explorer中無法工作

的代碼是在這裏:

#article::after { 
 
    content: url('../images/iconas.png') no-repeat; 
 
    text-align: center; 
 
    position: relative; 
 
    float: left; 
 
    margin-right: 30%; 
 
    margin-bottom: 5%; 
 
} 
 
#article1::after { 
 
    content: url('../images/iconas.png') no-repeat; 
 
    position: relative; 
 
    text-align: center; 
 
    float: left; 
 
    margin-right: 30%; 
 
    margin-bottom: 5%; 
 
} 
 
.hr { 
 
    margin-top: 50px; 
 
    float: left; 
 
    border: none; 
 
    border-top: 1px dotted #281e12; 
 
    background-color: transparent; 
 
    height: 1px; 
 
    width: 50%; 
 
}
<article class="col-md-12 text-center dark-text"> 
 
    <h1 style="text-align:left;"><span class="animated" data-fx="bounceInRight">A series of fires</span></h1> 
 
    <article id="article"> 
 
    <hr class="hr"></hr> 
 
    </article> 
 

 
</article>

+0

,你用的是什麼版本的瀏覽器? https://css-tricks.com/browser-support-pseudo-elements/ –

回答

3

沒有爲content屬性的值no-repeat。刪除它,代碼將工作。 Chrome似乎忽略了該值並顯示圖標。

錯誤:

CSS Validator Error

輸出在Firefox:

enter image description here

+0

非常感謝您的幫助 –

+0

歡迎,Billeh! :) –

+0

當我在手機上打開[this](http://www.firebrand.co.ke)時,有些單詞互相重疊,而不是休息一下,然後轉到下一行。 –

相關問題