CSS 在 jumbotron bootstrap 3 中删除填充?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/20727020/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
remove padding in jumbotron bootstrap 3?
提问by mridul
How to remove the default padding from jumbotron bootstrap 3? I am trying to set padding-top:5px;
in jumbotron div. But there is some default padding, how to remove it?
如何从 jumbotron bootstrap 3 中删除默认填充?我正在尝试padding-top:5px;
在 jumbotron div 中设置。但是有一些默认填充,如何删除它?
回答by kumarharsh
The problem is that the CSS selector's specificity for jumbotron would be greater than the one you are applying.
问题是 CSS 选择器对 jumbotron 的特异性将大于您正在应用的那个。
You can read more about the CSS Selector Specificity here
You can add an ID to your jumbotron, and style that,
您可以为您的超大屏幕添加一个 ID,并设置样式,
#jumbo {
padding: 5px;
}