1、定位位置问题
在某些6s上定位的层,定位不写左右定位,默认left:0,但是在有些iphone上是不行的,所以需要加上left或者right.即位置必须写全,left:0;right:0;bottom:0;要不然有问题,问题见截图1和截图2底部按钮表现形式。 样式:
.sharelayer {
position: fixed;
bottom: 0;
width: 100%;
height: 50px;
background-image: linear-gradient(90deg,#00d66f,#43ac43);
border: 1px solid #e5e5e5;
color: #fff;
font-size: 16px;
text-align: center;
line-height: 50px;
}
.sharelayer {
position: fixed;
bottom: 0;
width: 100%;
height: 50px;
background-image: linear-gradient(90deg,#00d66f,#43ac43);
border: 1px solid #e5e5e5;
color: #fff;
font-size: 16px;
text-align: center;
line-height: 50px;
left: 0;
right: 0;
}
2、iPhone点击事件无效、当给一些非a dom绑定事件时,点击没有响应,要加上cursor: pointer。
3、iPhone定位输入、如果有吸底定位,在输入弹窗键盘时,显示丑,我常用的解决方式是,当输入时,去掉定位,失去焦点恢复定位。
4、IPhone页面fixed定位的容器,容器里是表单输入(见截图3)。当输入数据时会有问题,Iphone 7 8p光标脱离输入框、iPhoneSE点击事件错乱,等非常见问题,将定位改为absolute即可。