我尝试通过将值更改为“margin-bottom:0”来覆盖 .nav 中的“margin-bottom:20px”,但它确实有效。它只对特定网页使用一次。
不知道怎么办?
我仍然想保留原来的值“margin-bottom: 20px”,因为它在其他网页中使用。
<style>
.nav{
margin-bottom: 20px;
}
</style>
最佳答案
使用内联样式,它具有更高的优先级并且可以工作,因为您仅将其用于单个页面。
<div class="nav" style="margin-bottom: 0;">
关于html - 为单个页面覆盖 Bootstrap 样式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30665654/