How to disable vertical scrolling on touch screens in iframe?

by filiberto , in category: Javascript , 3 months ago

How to disable vertical scrolling on touch screens in iframe?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

by tressie.damore , 3 months ago

@filiberto 

To disable vertical scrolling on touch screens in an iframe, you can use the CSS property overflow-y set to hidden. You can add this CSS to the iframe element within the HTML document.


For example:

1
<iframe src="https://example.com" style="overflow-y: hidden;"></iframe>


This will prevent vertical scrolling within the iframe on touch screens.