HTML iframe scrolling 屬性
實例
帶有滾動條的<iframe>:
<iframe src="http://www.w3cschool.cc/" width="200"
height="200" scrolling="yes">
</iframe>
</iframe>
嘗試一下»
瀏覽器支持
所有主流瀏覽器都支持scrolling 屬性。
定義和用法
HTML5不支持<iframe> scrolling屬性。 請使用CSS代替。
scrolling 屬性規定是否在<iframe> 中顯示滾動條。
默認地,如果內容超出了<iframe>,滾動條就會出現在<iframe> 中。
語法
<iframe scrolling="auto|yes|no">
屬性值
值 | 描述 |
---|---|
auto | 在需要的情况下出现滚动条(默认值)。 |
yes | 始终显示滚动条(即使不需要)。 |
no | 从不显示滚动条(即使需要)。 |
HTML <iframe>標籤