Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rendering HTML page preview

I would like to show a preview of a full HTML page in an element on another page. The whole page should be shown in a small 200x200 . What would be the correct way to achieve this?

like image 616
Erik Avatar asked Jan 12 '16 08:01

Erik


1 Answers

Please check this out :

.preview {
    width:600px; height:400px;
    -webkit-transform:scale(.25);
    -ms-transform:scale(.5);
    transform:scale(.5);
    -webkit-transform-origin:0 0; 
    -ms-transform-origin:0 0; 
    transform-origin:0 0; 
    border:4px solid blue;
    margin:0 0 -300px 0;
}
<iframe class="preview" src="http://www.w3schools.com">
  <p>Your browser does not support iframes.</p>
</iframe>
like image 107
Eko Junaidi Salam Avatar answered Oct 02 '22 20:10

Eko Junaidi Salam