我想在 Twitter Bootstrap(最新的 3.xx 版本)中减少各种屏幕尺寸的 Jumbotron 尺寸。现在确实会触发视口断点,例如display: none
在某个部分上,但 Jumbotron 大小不会改变。这里有什么问题?
@media only screen and (max-width: 767px), only screen and (max-device-width: 767px) {
.jumbotron {
height: 30%;
height: 30vh;
}
}
这是我通常的设置
.jumbotron {
padding-left: 50px;
padding-right: 50px;
background: #41A4DA;
margin-bottom: 0px;
min-height: 70%;
min-height: 70vh;
display: flex;
align-items: center;
}
min-height保持为 70vh,height尝试为 30vh,将 min-height 放在媒体查询块中应该可以工作。
另外,请确保在 css 文件中的 .jumbotron 类之后解析 @media 查询块。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句