亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

javascript - The default page has scroll bars. When the pop-up layer appears, how can I hide the original scroll bar and make the pop-up content scrollable?
phpcn_u1582
phpcn_u1582 2017-05-18 11:00:54
0
4
608

On the mobile phone page, the default body content is a lot, with scroll bars. When a pop-up layer appears when clicked, the body content cannot be scrolled, but the pop-up layer can be scrolled! How to deal with it?

phpcn_u1582
phpcn_u1582

reply all(4)
左手右手慢動(dòng)作

It seems that there is no need to set anything separately. When the pop-up layer appears, set the original content to overflow and hide, the pop-up layer will overflow automatically, and the opposite will be true when closing it

大家講道理

You can prevent bubbling in the scroll event of the popup layerevent.stopPropagation(). Then when scrolling the pop-up layer, the external scroll event will not be triggered.

$(".pop_box").on("touchmove",function(event){
    event.stopPropagation()
})
習(xí)慣沉默

You can try the modal box of bootstrap. It seems that the pop-up layer of the modal box can be scrolled, but the body cannot.

Ty80

Set the width and height of the body to 100% and overflow: hidden; the popup layer overflow: auto; should be fine

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template