在html中,scrolling的中文意思为“滚动”;它是iframe标签的一个属性,用于规定是否在iframe中显示滚动条,语法格式“<iframe scrolling="值">”,可设置的属性值有auto、yes、no。

本教程操作环境:windows7系统、HTML5版、Dell G3电脑。 
HTML <iframe> 标签的 scrolling 属性 scrolling 属性规定是否在 iframe 中显示滚动条。默认地,如果内容超出了 iframe,滚动条就会出现在 iframe 中。 语法格式: <iframe scrolling="value"> | 属性值 | 描述 |
|---|
| auto | 在需要的情况下出现滚动条(默认值)。 | | yes | 始终显示滚动条(即使不需要)。 | | no | 从不显示滚动条(即使需要)。 |
示例:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<p>显示滚动条的 iframe:</p>
<iframe src="https://www.php.cn" width="200" height="200" scrolling="yes">
<p>您的浏览器不支持 iframe 标签。</p>
</iframe>
<p>没有滚动条的 iframe :</p>
<iframe src="https://www.php.cn" width="200" height="200" scrolling="no">
<p>您的浏览器不支持 iframe 标签。</p>
</iframe>
</body>
</html> |