隐藏iframe上的水平滚动条? [英] Hide horizontal scrollbar on an iframe?

查看:80
本文介绍了隐藏iframe上的水平滚动条?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要使用css,jquery或js来隐藏iframe上的水平滚动条。

我会建议做这与


  1. CSS overflow-y:hidden;

  2. scrolling =no (对于HTML4)

  3. seamless =seamless (用于HTML5)
  4. *

* 无缝属性有 从标准中删除 ,以及否浏览器支持它。






  .foo {width:200px; height:200px; overflow-y:hidden;}  

< iframe src = https://bing.comclass =fooscrolling =no>< / iframe>

p>

I need to hide the horizontal scollbar on an iframe using css, jquery or js.

解决方案

I'd suggest doing this with a combination of

  1. CSS overflow-y: hidden;
  2. scrolling="no" (for HTML4)
  3. and seamless="seamless" (for HTML5)*

* The seamless attribute has been removed from the standard, and no browsers support it.


.foo {
  width: 200px;
  height: 200px;
  overflow-y: hidden;
}

<iframe src="https://bing.com" 
        class="foo" 
        scrolling="no" >
</iframe>

这篇关于隐藏iframe上的水平滚动条?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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