在苹果IOS系统下CSS单一使用position:fixed定位,当有输入框的时候,在输入的时候滚动会出现固定层位置偏移问题。可以用如下方法解决
工具/原料
CSS编辑器
苹果手机
方法/步骤
1、所有外层元素都使用fixed布局,如:<headerstyle="position:fixed"></header><articlestyle="position:fixed"></article><footerstyle="position:fixed"></footer>
2、使用absolute定位,并使用javascript动态改变层的位置
3、在有输入框输入的时候,隐藏fixed层或设计为relative