An Interest In:
Web News this Week
- April 22, 2024
- April 21, 2024
- April 20, 2024
- April 19, 2024
- April 18, 2024
- April 17, 2024
- April 16, 2024
July 25, 2019 07:00 pm GMT
Original Link: https://css-tricks.com/responsive-iframes/
Responsive Iframes
Say you wanted to put the CSS-Tricks website in an <iframe>
. You'd do that like this:
<iframe src="https://css-tricks.com"></iframe>
Without any other styling, you'd get a rectangle that is 300x150 pixels in size. That's not even in the User Agent stylesheet, it's just some magical thing about iframes (and objects). That's almost certainly not what you want, so you'll often see width and height attributes right on the iframe itself (YouTube does this).
<iframe width="560" height="315" src="https://css-tricks.com"></iframe>
Those attributes are … Read article
The post Responsive Iframes appeared first on CSS-Tricks.
Original Link: https://css-tricks.com/responsive-iframes/
Share this article:
Tweet
View Full Article