例如:
你有这个:
<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>