When it comes to HTML5, scrolling attribute is no longer supported - but I still need to remove the scroll bars - how to do that?
相关问题
- how to get selected text from iframe with javascri
- Use JS/jQuery to scroll a div's content that h
- Jscrollpane - Fires a function when isAtBottom
- Rounded corners on a textarea with a scrollbar
- How do you scroll an iframe from within using jque
相关文章
- iframe的里内容看不到,但却点得到
- HTML5 control
- SwiftUI automatically scroll to bottom in ScrollVi
- iframe content disappears on Firefox
- Changing an IFrames InnerHtml from codebehind
- Scrolling issues with ExtJS 5 app inside IFrame
- iframe not reading cookies in Chrome
- Prevent page navigation on horizontal scroll
In HTML5 there is no scrolling attribute because "its function is better handled by CSS" see http://www.w3.org/TR/html5-diff/ for other changes. Well and the CSS solution:
CSS solution:
HTML4's
scrolling="no"
is kind of an alias of the CSS'soverflow: hidden
, to do so it is important to set size attributes width/height:Add this class to your iframe and you're done:
! IMPORTANT NOTE ! :
overflow: hidden
for<iframe>
is not fully supported by all modern browsers yet(even chrome doesn't support it yet) so for now (2013) it's still better to use Transitional version and usescrolling="no"
andoverflow:hidden
at the same time :)