点击前#page
position:fixed;
top:0px;
left:0px;
width:100%
z-index:500;
点击导航后#page设为 position: relative;
element.style{
position:fixed;
z-index:999;
width:100%;
height:100%;
top:0px !important;
left:0px !important;
}
If the property has a value different than none, a stacking context will be created. In that case the object will act as a containing block for position: fixed elements that it contains.
所以去掉外层transform,#page添加position:fixed相关设置即可。
https://developer.mozilla.org...
10 回答11.1k 阅读
6 回答3k 阅读
5 回答4.8k 阅读✓ 已解决
4 回答3.1k 阅读✓ 已解决
2 回答2.7k 阅读✓ 已解决
3 回答5.1k 阅读✓ 已解决
5 回答2k 阅读
以下代码影响了定位
方法一:就一个swiper轮播图,没必要硬件加速了,直接去掉即可
方法二:把要定位的元素移到这些个元素外面去