IFrame to remove vertical scroll bar can still scroll

Source: Internet
Author: User

Iframe Internal page code:

<! DOCTYPE Html> <HTMLlang="en"> < Head> <Metacharset="UTF-8"> <title>title</title> <style>.Inner-container{position:Absolute;
            left:0; Overflow-x:Hidden; Overflow-y:Scroll; }/* For Chrome is only for Google browser * *.Inner-container::-webkit-scrollbar{display:None; } </style> </ Head> < Bodyclass="Inner-container"> <H1> Popcorn & Boiled water popcorn & boiled water popcorn & boiled water popcorn & boiled water popcorn & boiled water popcorn & boiled water popcorn & boiled water popcorn & boiled water popcorn & boiled water popcorn & Boiled water popcorn & boiled water popcorn & boiled water popcorn & boiled water popcorn & boiled water popcorn & boiled water popcorn & boiled water popcorn & boiled water popcorn & boiled water popcorn & boiled water popcorn & Boiled water popcorn & boiled water popcorn & boiled water popcorn & boiled water popcorn & boiled water popcorn & boiled water popcorn & boiled water popcorn & boiled water popcorn & boiled water popcorn & boiled water popcorn & Boiled water popcorn & boiled water popcorn & boiled water popcorn & boiled water popcorn & boiled water popcorn & boiled water popcorn & boiled water popcorn & boiled water popcorn & boiled water popcorn & boiled water popcorn & Boiled water popcorn & boiled water popcorn & boiled water popcorn & boiled water popcorn & boiled water popcorn & boiled water popcorn & boiled water popcorn & boiled water popcorn & boiled water popcorn & boiled water </H1> </ Body> </HTML>
External code that contains the IFRAME:

<! DOCTYPE html>  HTML  lang=  "en"  >  head  > <  Meta  charset=  UTF-8  >  title  >title</ Title  >  style  >.  Outer-container 
            {position:  relative ;
        Overflow:  hidden ; </ Style  > </ head  >  the body  >  div class=  Outer-container  >  iframe  marginwidth=  0  marginheight=  0  src=  "demo1.html"  scrolling=  "Auto"  frameborder=  0  width=  "100%"  ></ iframe  > </ div  > </ Body  > </ HTML  

Effect:

Both the horizontal and vertical scroll bars disappear, and the content can still be scrolled when scrolling the mouse.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.