TUTORIAL标准、参考与速查FETCHED

HTML <iframe> scrolling 属性

HTML &lt;iframe&gt; scrolling 属性 HTML &lt;iframe&gt; 标签 实例 带有滚动条的 &lt;iframe&gt;: &lt;iframe src='http://www.w3cschool.cc/' width='200' height='200'..

更新于 2026/7/16

教程详情页默认 noindex。

HTML <iframe> scrolling 属性

HTML iframe 标签参考手册 HTML <iframe> 标签

实例

带有滚动条的 <iframe>:

<iframe src="http://www.w3cschool.cc/" width="200" height="200" scrolling="yes">
</iframe>

尝试一下 »

浏览器支持

Internet ExplorerFirefoxOperaGoogle ChromeSafari

所有主流浏览器都支持 scrolling 属性。


定义和用法

HTML5 不支持 <iframe> scrolling 属性。请使用 CSS 代替。

scrolling 属性规定是否在 <iframe> 中显示滚动条。

默认地,如果内容超出了 <iframe>,滚动条就会出现在 <iframe> 中。


语法

<iframe scrolling="auto|yes|no">

属性值

值 描述
auto 在需要的情况下出现滚动条(默认值)。
yes 始终显示滚动条(即使不需要)。
no 从不显示滚动条(即使需要)。


HTML iframe 标签参考手册 HTML <iframe> 标签