How to disable vertical scrolling on touch screens in iframe?

by filiberto , in category: Javascript , 8 months ago

How to disable vertical scrolling on touch screens in iframe?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

by tressie.damore , 8 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.

Related Threads:

How to disable scrolling for an iframe in chrome?
How to show vertical scrollbar only for iframe?
How to prevent "back to top" scrolling in an iframe?
How to disable all clicks in iframe?
How to disable iframe from javascript?
How to disable toolbar in iframe?