@importステートメントを
<link>タグに変換するスクリプトを作成しようとしていますが、2 つの質問があります。
ステートメントと他のスタイル ステートメントをタグ
@import内に共存させることはできますか?<style>例えば:<style type="text/css"> @import url(http://www.example.com/style.css); body { background: #FFF; } ..NUI_ContentFrameHeader_l { clear: both; height: 50px; margin: 0; color: black; background: url(/vpn/images/NUI_box_l.png) no-repeat left top; border: solid 0px #BBC6D6; overflow: hidden; letter-spacing: 0; padding: 0 0 0 15px; } </style>@importタグの先頭に複数のステートメントが<style>あり、これがスコープ スタイル タグではない場合、@importステートメントを<link>ステートメントに変換してタグのすぐ上に移動でき<style>ますか? お気に入り:<style type="text/css"> @import url(http://www.example.com/style1.css); @import url(http://www.example.com/style2.css) body { background: #FFF; } ..NUI_ContentFrameHeader_l { clear: both; height: 50px; margin: 0; color: black; background: url(/images/NUI_box_l.png) no-repeat left top; border: solid 0px #BBC6D6; overflow: hidden; letter-spacing: 0; padding: 0 0 0 15px; } </style>となります:
<link type="text/css" media="screen" rel="stylesheet" href="http://www.example.com/style1.css" /> <link type="text/css" media="screen" rel="stylesheet" href="http://www.example.com/style2.css" /> <style type="text/css" media="screen"> body { background: #FFF; } ..NUI_ContentFrameHeader_l { clear: both; height: 50px; margin: 0; color: black; background: url(/images/NUI_box_l.png) no-repeat left top; border: solid 0px #BBC6D6; overflow: hidden; letter-spacing: 0; padding: 0 0 0 15px; } </style>