June 2, 2000 - The zoom Property
![]() |
June 2, 2000 The zoom Property Tips: May 2000
Yehuda Shiran, Ph.D.
|
object.style.zoom = magnification;where magnification can be one of the following:
| normal | Default. Normal size. No zoom in or zoom out. |
| scale | Floating point number that specifies the factor to apply. 1.0 is normal. |
| percentage | Floating point number followed by a percent sign. 100% is normal. |
You can apply this property to any object. For example, we made the paragraph you are reading now larger by a factor of 1.27. You need to identifiy the paragraph by an ID attribute, and then assign its zoom property in a JavaScript script. The paragraph looks like this:
<P ID="demo">You can apply...like this:</P>and the JavaScript script looks like this:
<SCRIPT LANGUAGE="JavaScript">
<!--
demo.style.zoom = "127%";
// -->
</SCRIPT>



