CSS中如何取消继承

来源:百度知道 编辑:UC知道 时间:2024/05/26 00:52:39

悬赏分:30 - 离问题结束还有 14 天 23 小时
不修改CLASS
只允许修改{}内的内容!

<style>
.aa{background-color:#ff9966;width:200;color:green;}
</style>
<span type="button" class="aa" id="sp1">关于改变CSS</span><br>
<INPUT TYPE="button" onclick="document.styleSheets[0].rules[0].style.color='red'" value="红色">
<INPUT TYPE="button" onclick="document.styleSheets[0].rules[0].style.color='blue'" value="蓝色">
<INPUT TYPE="button" onclick="document.styleSheets[0].rules[0].style.width='300'" value="300">
<INPUT TYPE="button" onclick="document.styleSheets[0].rules[0].style.width='400'" value="400">
<INPUT TYPE="button" onclick="document.styleSheets[0].rules[0].style.backgroundColor='#E066FF'" value="背景紫色">
<INPUT TYPE="button" onclick="docume