禁用在iframe中滚动 [英] disable scrolling in an iframe

查看:128
本文介绍了禁用在iframe中滚动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有一种方法可以禁止在iframe中一起滚动?

Is there a way to disable scrolling all together in an iframe?

我有一个iframe,其内容超出了iframe的尺寸,设置scrolling = no只会删除滚动条,但不会禁用滚动.

I have an iframe where the content exceeds the iframe dimensions, setting scrolling=no only removes the scrollbars but doesn't disable scrolling.

我无法控制iframe-html的头部,因此无法设置样式.

I don't have control over the head of the iframe-html, so I can't style my way out it.

有什么想法吗?

推荐答案

您是否看过CSS溢出属性?隐藏的价值可能会帮助您完成所需的工作.为什么要隐藏这个?多数情况下,我发现这与SEO错误或试图向用户隐藏其他信息有关.

Have you looked at the css overflow property? the hidden value may help do what you want. Why do you want to hide this? Most times I see this it is related to bad SEO or trying to hide other info from the user.

这篇关于禁用在iframe中滚动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆