【发布时间】:2019-04-06 08:02:45
【问题描述】:
更新
我尝试将height:100vh 添加到.app-container,但它不起作用。
我正在使用bootstrap 4 来设计我的网络应用程序。
我正在尝试为它设计Holy grail layout。
Chrome 上的一切似乎都很好,但IE 11。
在 chrome 上,我的布局是:
但是IE 11上的内容和上面不一样:
绿色区域的增长不像 Chrome 中那样。
这是我正在使用的layout.scss 课程:
.app-container {
display: flex;
flex-direction: column;
-ms-flex-direction: column;
-webkit-flex-direction: column;
min-height: 100vh;
.app-navigation-bar-container {
flex: none;
-ms-flex: none;
-webkit-flex: none;
margin-bottom: 5px;
}
.app-content-container {
flex: 1;
-ms-flex: auto;
-webkit-flex: 1;
background-color: green;
}
.app-footer {
background-color: blue;
height: 50px;
}
}
$navbar-wrapper-height: 65;
$navbar-inner-wrapper-height: 55;
$navbar-panel-margin-bottom: 5;
.navbar-wrapper {
height: #{$navbar-wrapper-height}px;
position: inherit;
.navbar-inner-wrapper {
height: #{$navbar-inner-wrapper-height}px;
.navbar-panel {
display: flex;
flex-direction: row;
-ms-flex-direction: row;
-webkit-flex-direction: row;
margin-bottom: #{$navbar-panel-margin-bottom}px;
.navbar-item {
padding-right: 15px;
padding-left: 15px;
padding-top: 5px;
padding-bottom: 5px;
text-align: center;
border-right: white solid 1px;
&:first-child {
padding-left: inherit;
}
&:last-child {
padding-right: inherit;
border-right: inherit;
}
.main {
color: white;
font-weight: bold;
font-size: 16px;
}
.sub-header {
color: white;
}
}
}
}
}
.navbar-divider {
background-color: #ee8a01;
height: 5px;
margin-top: #{$navbar-wrapper-height - $navbar-inner-wrapper-height - $navbar-panel-margin-bottom}px;
}
.bg-red {
background-color: #d61a0c;
a {
color: white;
}
}
这是我的codepen
谁能帮帮我?
谢谢,
【问题讨论】:
-
将 height: 100vh 添加到类 .app-container
-
我试过了,但没有用。我已经提供了
codepen项目。有人可以看看吗?
标签: css sass responsive-design flexbox bootstrap-4