Sometimes, we want to scale the content of an iframe with CSS.
In this article, we’ll look at how to scale the content of an iframe with CSS.
How to scale the content of an iframe with CSS?
To scale the content of an iframe with CSS, we use the transform
property.
For instance, we write
#frame {
-ms-zoom: 0.75;
-moz-transform: scale(0.75);
-moz-transform-origin: 0 0;
-o-transform: scale(0.75);
-o-transform-origin: 0 0;
-webkit-transform: scale(0.75);
-webkit-transform-origin: 0 0;
}
to use transform
to transform the iframe’s content to 75% of its original size with scale(0.75)
.
Conclusion
To scale the content of an iframe with CSS, we use the transform
property.