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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-30 01:22:44  来源:igfitidea点击:

remove padding in jumbotron bootstrap 3?

csstwitter-bootstrap-3padding

提问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

您可以在此处阅读有关 CSS选择器特异性的更多信息

You can add an ID to your jumbotron, and style that,

您可以为您的超大屏幕添加一个 ID,并设置样式,

#jumbo {
  padding: 5px;
}