【发布时间】:2019-04-01 15:15:49
【问题描述】:
我已经实现了以下代码,防止屏幕让用户在使用ipad时看到网站的弹性溢出。
.main-layout::ng-deep {
width: 100%;
height: 100%;
position: fixed;
overflow-y: scroll;
overflow-x: hidden;
-webkit-overflow-scrolling: touch;
//overflow: hidden;
}
代码似乎运行良好,但现在页面底部的页脚被截断,这似乎只是 IOS safari 上的问题。我希望页脚保留在页面底部而不会被截断。我已经看到了使用 JavaScript 的解决方案,但理想情况下我只想使用 CSS。
所以我在防止弹性滚动的地方进行了修复。但是页脚被截断,用户无法向下滚动查看。
这是页脚的 CSS
.footer {
@media (max-width: $screen-sm-max) {
font-size: 12px;
}
@media (max-width: $screen-sm-min) {
font-size: 10px;
}
@extend .center;
height: $header-height;
text-align: center;
width: 100%;
background-color: $gray-ltr;
font-size: 14px;
overflow: auto;
border-top: 2px solid $gray-lt;
}
【问题讨论】: