twitter-bootstrap Bootstrap 模态的边距顶部
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/29438662/
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
Margin-top of Bootstrap modal
提问by E.D.A
I added Bootstrap modals to my website, but I've noticed that the space between the modal and the top of the screen is greater than the space between the modal and the bottom of the screen.
我在我的网站上添加了 Bootstrap 模态,但我注意到模态和屏幕顶部之间的空间大于模态和屏幕底部之间的空间。
I've added style="margin-top:0;padding-top:0"to each of the divtags but it had no effect.
我已经添加style="margin-top:0;padding-top:0"到每个div标签,但它没有效果。
The intention is to decrease the gap between the modal and the top of the screen.
目的是减少模态和屏幕顶部之间的间隙。
采纳答案by E.D.A
Using the topand bottomin my CSS worked just great. I modified the modal class and added top:10px.
在我的 CSS 中使用top和bottom效果很好。我修改了模态类并添加了top:10px.

