javascript - Zooming specific elemens on paper -
how can zoom in specific symbols on paper. mean is, can able zoom whole page, want zoom in specific elements.
while googling found 1 example. in scaling.
do have idea how can zoom?
you can use semi standard css zoom
, , semi compliant -moz-transform: scale(x);
on element. noted, scale it. in order zoom it, or mimic real zoom, have wrap in relatively positioned element, , place scaled content in absolutely positioned element. here example:
html
<div class="holder"><div id="d">no zoom</div></div> <div class="holder"><div id="a">zoom</div></div>
css
#d, #a{ position:absolute; width:100%; height:100%; } .holder{ overflow:hidden; position:relative; width:90px; height:90px; background-color:blue; color:white; border: 2px solid black; padding:10px; }
js
var = document.getelementbyid("a"); a.onmouseover = function(){ this.setattribute("style","zoom: 5;-moz-transform:scale(5);"); }; a.onmouseout = function(){ this.removeattribute("style"); };
Comments
Post a Comment