I'm looking to disable the horizontal scroll bar on the iPad in Safari when on my site.
I've tried e.preventDefault
but this seems to disable both vertical and horizontal scrolling.
Thanks!
try this
<meta name="viewport" content="width=device-width; initial-scale = 1.0; maximum-scale=1.0; user-scalable=no" />
<style type="text/css">
body {
overflow-x:hidden;
}
将其插入html页面的头部:
<meta name="viewport" content="width=device-width" />
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.