你有这样的:
<style type="text/css">
.myrule {
font-weight:bold;
}
</style>
<div class="myrule">
This text will bold but
</div>
<style type="text/css">
.myrule {
font-weight:normal; /* This code will affect the original .myrule */
}
</style>
我需要知道是否可以 “锁定” CSS规则,这样的例子:
<style type="text/css">
.myrule:locked {
color:yellow;
}
</style>
<div class="myrule">
This text will yellow always!!!!!!!
</div>
<style type="text/css">
.myrule {
color:red;
}
</style>
加入你的CSS标签它自己,然后它会将该规则添加到该标签例如: – EnterJQ 2013-02-26 06:15:20
你应该更好地解决你的规则和导入虽然 – Alexander 2013-02-26 06:16:26
对于任何'!重要“的答案,还要注意[属性的优先级,关于!重要](http://www.w3.org/TR/CSS21/cascade.html#important-rules)。 – FakeRainBrigand 2013-02-26 06:23:55