我想將CSS文件應用於頁面中的具體DIV。這是頁面結構:將CSS樣式應用於DIV中的所有元素
<link rel="stylesheet" href="style.css" />
...
<body>
<div id="pagina-page" data-role="page">
...
<div id="applyCSS">
(all the elements here must follow a concrete CSS rules)
</div>
...
</body>
我嘗試應用CSS文件的編輯像這樣(CSS文件是如此之大)規則:
#applyCSS * { (For all the elements inside "applyCSS" DIV:)
.ui-bar-a {
...
...
}
.ui-bar-a .ui-link-inherit {
...
}
...
}
但是這種解決方案不起作用。那麼,我該怎麼做?
可能的重複:http://stackoverflow.com/questions/12110708/limit-stylesheet-to-one-tag-and-descendents/12553605#12553605 – Pavlo 2013-04-09 12:18:16