是否可以使用其默认值覆盖display属性?例如,如果我在一种样式中将其设置为none,并且我希望以其默认值覆盖它.
或者是找出该元素的默认值然后将其设置为的唯一方法?想要不必知道元素通常是块,内联还是以其中任何一个...
可能重复:
取消继承(重置)特定元素的CSS样式?
我有一个页面可以加载具有不同CSS属性的外部CSS文件。
是否可以在同一页面内创建一个元素,并且专门为该元素创建一个不加载任何CSS的元素?
例如:
<style type="text/css">
p {
background-color:#000000;
width:550px;
}
</style>
<p>This should get the P styling from the style tag</p>
<p>This should NOT get the P styling</p>
Run Code Online (Sandbox Code Playgroud)