2014-10-27 47 views
0

我正在將一個網站的標題從一個網站集成到另一個網站。 頭文件依賴於外部的css文件,以及js文件。CSS @import是否導致文件擴展名被忽略?

我試着使用<style scoped>的方法與@import url('')裏面 來限制進口的CSS的效果(使用框架不是一個選項...)

的問題是,這個代碼行:

<style scoped> 
@import url("https://staging.redmatch.com/Staging_RecruiterPro/Candidate/FileServer/Affiliates/512888/CSS/system.base.css?n7xfen"); 
</style> 

創建以下要求(如使用招所示):

https://staging.redmatch.com/Staging_RecruiterPro/Candidate/FileServer/Affiliates/512888/CSS/system.base?n7xfen 

所以我的問題是, 爲什麼.css忽略,可以解決此問題?

問候, jerom

回答

0

MDN,我們應該考慮以下幾件事讓範圍的功能工作:

[1] Supported in Chrome 20+ by enabling the "Enable <style scoped>" or "experimental WebKit features" flag in chrome://flags.

[2] Gecko 20 and later implement :scope pseudo-classes, but the preference layout.css.scope-pseudo.enabled must be set to true. This is only the case by default in Nightly and Aurora test versions.

。並在同一鏈接中檢查live example以瞭解您的瀏覽器是否支持scope屬性。

+0

感謝您的清除。我的印象'範圍'是更多的瀏覽器支持。 – 2014-10-27 12:23:29

+0

@yaronhochman不客氣。如果這篇文章解決了您的問題,請將此帖標記爲已接受的答案。 :) – 2014-10-27 13:17:13