2017-03-07 71 views
1

我有一些代碼,顯示未讀消息的形式通知一個字體,真棒收件箱與紅色圓圈警報和未讀的郵件數量。該代碼工作正常(迄今爲止測試)在Firefox(Mac和PC),即鉻電腦。字體真棒堆棧問題與CSS不應用Chrome PC

這是我以前http://codepen.io/johnstuif/pen/pvLgYp

的例子下面是它看起來像在Firefox(蘋果機)

enter image description here

它無法在Chrome(蘋果機)工作。我能夠看到收件箱,但我無法看到紅色圓圈和數字。

.fa-stack 
 
{ 
 
    margin-bottom: -60px; 
 
} 
 
    
 
.fa-stack[data-count]:after 
 
{ 
 
position:absolute; 
 
right:66.9%; 
 
top:-5%; 
 
content: attr(data-count); 
 
font-size:30%; 
 
padding:.5em; 
 
border-radius:999px; 
 
line-height:.60em; 
 
color: white; 
 
background:rgba(255,0,0,.85); 
 
text-align:center; 
 
min-width:.1em; 
 
font-weight:bold; 
 
}
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet"/> 
 
<a class="navbar-brand dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false" id="inbox_container" style="margin-top: -9px"> 
 
<span class="fa-stack fa-2x" id="inbox_total" data-count="3"> 
 
    <i class="fa fa-inbox"></i> 
 
</span> 
 
</a>

我假設有一個bug問題與瀏覽器,但如果我連我不能爲我的生活弄清楚如何得到它與Chrome瀏覽器(MAC)工作能夠。

+0

請修改上面的代碼片段,使其看起來像它應該(在工作瀏覽器中) –

+0

多數民衆贊成我到目前爲止,不知道爲什麼紅色徽章關閉。這很奇怪,我可以在堆棧中看到它,但在我的網站上沒有運行Chrome的Mac –

回答