Html 移除引导中收割台的上边缘
HTML 我想删除下图中标记的顶部边距Html 移除引导中收割台的上边缘,html,css,twitter-bootstrap-3,Html,Css,Twitter Bootstrap 3,HTML 我想删除下图中标记的顶部边距 将h1和页眉的页边距顶部设置为0,并确保身体没有任何填充物: .header_site { background-color: darkblue; } font { color: white; margin: auto 160px auto 160px; } 如果你需要你的h1向下移动一点,那么给它填充顶部只需重写类页眉和标签: 请添加以下css。默认情况下HTML为h1标记有自己的页边距,这就是它发生的原因添加页边距顶部:0在中。页眉h
将h1和页眉的页边距顶部设置为0,并确保身体没有任何填充物:
.header_site {
background-color: darkblue;
}
font {
color: white;
margin: auto 160px auto 160px;
}
如果你需要你的
h1
向下移动一点,那么给它填充顶部
只需重写类页眉
和标签
:
请添加以下css。默认情况下HTML为
h1
标记有自己的页边距,这就是它发生的原因添加页边距顶部:0代码>在中。页眉h1
类
.page-header {
margin: 0 0 20px;
}
.page-header h1 {
margin-top: 0;
}
.header\u站点{
背景色:深蓝色;
}
字体{
颜色:白色;
保证金:自动160px自动160px;
}
.页眉h1{
边际上限:0;
}
ABC公司
修改样式如下
.page-header h1 { margin-top: 0; }
对于引导3,只需添加类“媒体标题”
ABC公司
它将h3样式还原为浏览器样式。说它在chrome上不起作用,但我检查了一下,效果很好。
已经被弃用,不应该再使用了。我很惊讶他们还在教这个。你需要设置margin:0代码>至h1
和类上。页眉
至页边空白顶部:0
@Paulie\u D感谢您提供的信息。
.page-header {
margin: 0 0 20px;
}
.page-header h1 {
margin-top: 0;
}
.page-header h1 { margin-top: 0; }
.header_site {
background-color: darkblue;
margin:0;
float:left;
width:100%
}
<h1 class="media-heading"><font>ABC Company</font></h1>
h3 {
margin-top: revert !important;
margin-bottom: revert !important;
}