html - 位置修复底部不适用于 iOS Safari
问题描述
非常不幸的是position: fixed; bottom: 0;
唯一在 iOS Safari 上。
有一些在线解决方案说使用transform: translate3d(0,0,0);
也不适用于此错误。
iOS版本是11.4
演示:https ://codepen.io/athimannil/pen/BqBezY
body {
height: 1500px;
background-repeat: no-repeat;
background-image: linear-gradient(red, yellow, green);
color: white;
position: relative;
}
.link {
display: block;
text-align: center;
background-color: deepskyblue;
width: 100%;
height: 50px;
line-height: 50px;
text-decoration: none;
color: white;
position: fixed;
right: 0;
bottom: 0;
left: 0;
margin: auto;
transform: translate3d(0, 0, 0);
}
<a class="link" href="#">Hello</a>
解决方案
推荐阅读
- angular - 如何将服务注入另一个服务并在 Angular 中导出的常量或接口中使用它?
- laravel - 我如何反向使用 eloquent 模型检索数据
- r - 如何在 R 中创建多个 coropra
- excel - 通过excel中的宏从URL下载和重命名文件
- django - 如何使用 django 逐步呈现具有多个部分的页面?
- r - 如何仅匹配行中内容的前两个字母不相等的行
- r - 仅选择 2 个不同数据帧 R 中的匹配列
- c# - 通过 GridViewCheckBoxColumn(Telerik 组件)访问所有选中的 RadGridView 的行
- git - Jenkins 管道 ssh 代理 git push 失败
- wpf - WPF 屏幕捕获不包括标题栏