2010-11-02 64 views
4

如何使用border-radius.htc與IE瀏覽器,使圓角如何使用border-radius.htc與IE瀏覽器,使圓角

我使用border-radius.htc解決邊界半徑在IE

它工作得很好這裏 http://www.faressoft.org/eshterakat/border-radius/border-radius.html

但它不工作,在我的html頁面!我不知道爲什麼! http://www.faressoft.org/eshterakat/

-moz-border-radius:5px; 
-khtml-border-radius:5px; 
-webkit-border-radius:5px; 
border-radius:5px; 
behavior:url('Js/border-radius.htc'); 

-

/* I tried '../Js/border-radius.htc' it didn't work too */ 
/* I tried '/Js/border-radius.htc' it didn't work too */ 
/* I tried 'Js/border-radius.htc' it didn't work too */ 

回答

4

有2個陷阱與HTC的;

  • 服務器具有服務器正確的MIME類型(文本/ x分量)如果HTC您在Apache添加到您的配置或的.htaccess:將AddType文本/ x分量.HTC

  • 在CSS中,URL是相對於CSS文件的... HTC引用是相對於Calling HTML頁面的 - 要小心。

+0

此頁http://www.faressoft.org/eshterakat/border-radius/border-radius.html是在我的服務器,它是行之有效的! – faressoft 2010-11-02 04:53:10

+0

它工作與否? – 2010-11-02 05:38:52

+0

它在這裏工作http://www.faressoft.org/eshterakat/border-radius/border-radius.html但它不工作在這裏http://www.faressoft.org/eshterakat/ – faressoft 2010-11-02 05:45:36

1

這實際上是一些具體的事情,這是提到很簡單。

使用HTC組件時,您需要確保它們位於網站根位置。那麼你只會提到這個行爲:url(css3orw/e.htc);

這個句子中的url與你在css中引用圖片的方式不一樣。這將永遠不需要你拉一些網址(../../ asf.ext)等,你可能會習慣與在css中的圖像的相對性質

2

只需編輯border-radius.htc

fill.color = fillColor; 

fill.color = (fillColor=='transparent') ? 'none': fillColor; 

和改變,並把css文件和HTC文件成例如同一個文件夾那麼文件夾名稱"cssSupport"它像:

zoom:1; 
display: block; 
background-color:Transparent; 
border: 1px solid #696; 
-webkit-border-radius:8px; 
-moz-border-radius:8px; 
border-radius:8px; 
border-bottom-right-radius:8px; 
border-bottom-left-radius:8px; 
behavior:url(../CSS_Support/border-radius.htc); 

試試這個。它一定會奏效。享受IE8。

+0

我一直試圖在IE8中獲得一些邊界。你如果解決了我的背景色問題!非常感謝。 – nrod 2013-05-03 14:41:40