Jquery Boostrap/CSS总是将内容完全集中在页面中央
我一直在努力使我的内容始终以中心为中心。我让宽度居中:文本对齐,但我不知道如何垂直居中我的内容。以下是该元素的代码: HTML: 有人知道如何自动垂直对齐此内容以使其位于页面中心的修复方法吗?尝试以下方法:Jquery Boostrap/CSS总是将内容完全集中在页面中央,jquery,html,css,twitter-bootstrap,twitter-bootstrap-3,Jquery,Html,Css,Twitter Bootstrap,Twitter Bootstrap 3,我一直在努力使我的内容始终以中心为中心。我让宽度居中:文本对齐,但我不知道如何垂直居中我的内容。以下是该元素的代码: HTML: 有人知道如何自动垂直对齐此内容以使其位于页面中心的修复方法吗?尝试以下方法: .outter { position: absolute; display: table; width: 100%; height: 100%; text-align: center; } .middle { display: table-ce
.outter {
position: absolute;
display: table;
width: 100%;
height: 100%;
text-align: center;
}
.middle {
display: table-cell;
vertical-align: middle;
}
.content {
text-align: center;
display: inline-block;
width: auto;
}
.content h1{
color: black;
font-family: NoveBold;
line-height:94%;
}
.content p{
color: black;
font-family: NoveLight;
}
简单地搜索一下之前提出的问题,你就会发现这个问题已经被问了很多次了,而且回答了很多次。它就像一个符咒一样有效!谢谢你,我只是在摆弄桌子看看能不能用。非常感谢!
.content {
text-align: centre;
}
.content h1{
color: white;
font-family: NoveBold;
font-size: 150px;
line-height:94%
}
.content p{
color: white;
font-family: NoveLight;
font-size: 30px;
}
.content img{
}
.content btn {
}
.outter {
position: absolute;
display: table;
width: 100%;
height: 100%;
text-align: center;
}
.middle {
display: table-cell;
vertical-align: middle;
}
.content {
text-align: center;
display: inline-block;
width: auto;
}
.content h1{
color: black;
font-family: NoveBold;
line-height:94%;
}
.content p{
color: black;
font-family: NoveLight;
}