2011-10-20 34 views
0

我們如何將CSS樣式表(style.css)添加到XSL文件,以便它可以在Internet Explorer中使用?如何在Internet Explorer的XSL文檔中包含CSS樣式表?

<head> 
    <title><xsl:value-of select="bom/header/title"/></title> 
    <link rel="stylesheet" type="text/css" href="/BOM-Download-portlet/css/styles.css" title="Style"/> 
</head> 

這是工作在Firefox和其他現代瀏覽器,但不是在IE

+0

什麼是工作?請給我們一些代碼。 –

回答

1

IE瀏覽器往往會引起一個問題,所以我在我的.html文件添加例外,像這樣:

<!--[if lt IE 9]> 
<script type="text/javascript" src="js/html5.js"></script> 
<style type="text/css">.bg{ behavior: url(js/PIE.htc); }</style> 
<![endif]--> 

<!--[if lt IE 7]> 
<div style=' clear: both; text-align:center; position: relative;'> 
    <a href="http://www.microsoft.com/windows/internet-explorer/default.aspx? ocid=ie6_countdown_bannercode"> 
    <img src="http://www.theie6countdown.com/images/upgrade.jpg" border="0" alt="" />  </a> 
</div> 
<![endif]--> 

上面的代碼充當腳本,根據需要檢測和更改設置,同樣在.html註釋中,因此在加載頁面時沒有拿起並試圖解析。

希望這會有所幫助

相關問題