How to disable body scrolling when modal is open IOS only

前端 未结 2 1951
说谎
说谎 2021-02-04 18:33

IOS only / iPhone X / iPhone 7 etc.

Even jquery modal libraries don\'t work! https://jquerymodal.com/ - Open the modal on your iPhone and you will be able to scroll the

2条回答
  •  佛祖请我去吃肉
    2021-02-04 19:17

    Umm I see there are few topics already on SO. Try this maybe?

    @supports (-webkit-overflow-scrolling: touch) {
      /* CSS specific to iOS devices */ 
    }
    
    @supports not (-webkit-overflow-scrolling: touch) {
      /* CSS for other than iOS devices */ 
    }
    

    CSS media query target only iOS devices

提交回复
热议问题