在ios中使用fixed定位,當(dāng)頁面超出一屏?xí)r會(huì)出現(xiàn)fixed定位隨著頁面滾動(dòng)而滾動(dòng),解決方法,
//父容器
<div class='main'>
<div class='maincon'>
//內(nèi)容區(qū)
</div>
<div class='fixedflag'>
//定位區(qū)
</div>
</div>
.main{
width:750px;
height:100vh;
position:relative;
}
.maincon{
width:750px;
height:100%;
overflow-y:scroll;
-webkit-overflow-scrolling:touch;
::-webkit-scrollbar {
display: none;
}
.fixedflag{
position:absolute;
right:0;
bottom:30px;
}
}