简体   繁体   中英

Creating iframe area with scroll bar

I want to create an iframe area with scroll bar as like here

I checked html codes, and created iframe are like below. But area seems empty, when I put something inside. It's not showing on the screen.

 <iframe width="100%" height="315" allowfullscreen>
  <a class="twitter-timeline"
       data-lang="en" 
       href="https://twitter.com/username" 
       data-tweet-limit="10">
  </a> <a href="#" class="btn btn-secondary btn-sm fright">Follow Us on Twitter</a> 
</iframe>

How the iframe works No source nothing happens.

 <iframe src="https://stackoverflow.com/questions/48841319/creating-iframe-area-with-scroll-bar" width="500" height="315" style="overflow-y:scroll;">
 </iframe>

Same thing using a div. This is what you want unless it is another page you are trying to insert then use iframe or object.

CSS

.divExample{
overflow-y:scroll;
width:500px;
height:315px;
float:left;
border:thin #000000 solid;
}

HTML

<div class="divExample">
<a class="twitter-timeline"
   data-lang="en" 
   href="https://twitter.com/username" 
   data-tweet-limit="10">
</a> <a href="#" class="btn btn-secondary btn-sm fright">Follow Us on Twitter</a> 
</div> 

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM