html – 删除bootstrap中标题的上边距

html – 删除bootstrap中标题的上边距,第1张

概述HTML <div class="container-fluid"> <div class="row"> <div class="page-header header_site"> <h1><font>ABC Company</font></h1> </div> </div></div> CSS代码: .header_site { background-c HTML
<div >  <div >    <div >      <h1><Font>ABC Company</Font></h1>    </div>  </div></div>

CSS代码:

.header_site {  background-color: darkblue;}Font {  color: white;  margin: auto 160px auto 160px;}

我想删除上边距,如下图所示.

解决方法 给你的h1和页眉一个0的边距,并确保你的身体没有任何填充:
body { padding: 0; }.page-header,.page-header h1 {margin-top:0;}

Example bootply

如果你需要你的h1向下移动一点,那么给它填充顶部

总结

以上是内存溢出为你收集整理的html – 删除bootstrap中标题的上边距全部内容,希望文章能够帮你解决html – 删除bootstrap中标题的上边距所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/web/1140020.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-05-31
下一篇2022-05-31

发表评论

登录后才能评论

评论列表(0条)

    保存