我有一个div,我向其应用css类。现在在css类中,heigh被标为x px,但我希望我的div为y px。如何在不更改CSS的情况下覆盖CSS的高参数。
最佳答案
<div style="height: 80px"></div>
浏览器为元素分配具有最高特异性的样式。 As you can read here“样式”具有最高的特异性。
您可以使用the !important declaration覆盖特异性。
关于html - 为div覆盖CSS类的某些属性,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/5163932/