我有一个 html 的全局类
<div class="wrapper">
<div class="content"></div>
</div>
CSS 是
.div { width:auto; display:block }
.content { width:100px; height:50px; }
在 .content div 上,我不需要“display:block”类。但它适用于运行时。 我已经给出了 dispay:inherit;但它不起作用。有没有其他方法可以去除显示样式?
最佳答案
.div { width:auto; display:block }
这可能行不通....对于上面提供的 html cos 没有名为类的 div
你能做的是
.content { width:100px; height:50px; display:inline}
关于javascript - CSS 全局类问题与 child ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10121306/