2013-02-14 38 views
0

我在根目錄下的PIE.HTC並試圖使圓角在Internet Explorer中工作pie.htc不固定CSS3發出

這是我的CSS

#credits-earned 
{ 
    border-style:solid; 
    border-width:2px; 
    border-color:#EDEDED; 
    width:170px; 
    height:60px; 
    margin-bottom:10px; 
    font-weight: bold; 
    border-radius:8px; 
    behavior: url (PIE.htc); 
} 

這是試圖將HTML生效是:

<div id="credits-earned"> 
         You need to earn X<br> more credits today to avoid losing credits 
        </div> 

但是圓角在IE中不起作用。

任何幫助表示讚賞。

+0

您是否包含PIE.js文件的頭文件?另外PIE.htc是相對於文件而不是css – 2013-02-14 15:14:15

+1

打開一個新標籤並轉到your_domain/pie.htc。它是否加載文件? – Josh 2013-02-14 15:16:17

+1

@EricLemos Lemos CSS3PIE不需要任何js文件 - http://css3pie.com/documentation/getting-started/ – Josh 2013-02-14 15:29:25

回答

0

將資源包含在外部css文件中時,該URL與css文件相關。

如果要包括你可以使用相對路徑(例如behavior:url('../PIE.htc'))不同的目錄的東西,或者使用絕對路徑在樣式表中對路徑的(例如behavior:url('/PIE.htc')

更多 - Using relative URL in CSS file, what location is it relative to?

0

除了從pie.htc工作的正確路徑,給:

#credits-earned 
{ position: relative; 
}