Appearance:
{ zoom : vMagnification; }
Possible Values:
vMagnification
Initial Value:
normal
Applies to:
Sets or retrieves the magnification scale of the object. Microsoft® Internet Explorer 5+ only
Inherited:
No
Scripting: object.style.zoom [ = vMagnification ]
vMagnification Variant that specifies or receives one of the following values:normal Default. Magnification scale is normal. The object renders normal size. number Floating-point number that specifies the magnification scale, where 1.0 is normal.
<STYLE>
.clsTeenyWeeny { zoom: 0.10 }
</STYLE>
<P onmouseover="this.style.zoom='200%'"
onmouseout="this.style.zoom='normal'">HELP!!!</p>
HELP!!!
This example provides controls that let the user adjust the zoom property.
<HTML XMLNS:CONTROL>
<HEAD>
<TITLE>Zoom Demo</TITLE>
<SCRIPT>
function zoomIn() {
newZoom= parseInt(oZoom.style.zoom)+10+'%'
oZoom.style.zoom =newZoom;
oCode.innerText='zoom: '+newZoom+'';
}
function zoomOut() {
newZoom= parseInt(oZoom.style.zoom)-10+'%'
oZoom.style.zoom =newZoom;
oCode.innerText='zoom: '+newZoom+'';
}
function changeZoom() {
newZoom= parseInt(oSlider.value)
oZoom.style.zoom=newZoom+'%';
oCode.innerText='zoom: '+newZoom+'%';
}
function changeZoom2(oSel) {
newZoom= oSel.options[oSel.selectedIndex].innerText
oZoom.style.zoom=newZoom;
oCode.innerText='zoom: '+newZoom+'';
}
</SCRIPT>
</HEAD>
<BODY onload="oZoom.style.zoom='100%'; oCode.innerText='zoom: 100%'; " >
<!-- The zoomable area container -->
<DIV STYLE="position:absolute; top:15; left:76; width:550px; height:204px; background-color:black; vertical-align: middle; padding:25px; font-family:arial; font-weight:bold; color:white; z-index:3" ALIGN="center">
<!-- The zoomable area -->
<DIV ID="oZoom" STYLE="zoom:100%" ALIGN="center">
<H1>Welcome to Seattle!</H1>
<IMG SRC="logo.gif" ALIGN="left">
<P ALIGN="center">demonstrating the zoom command.</P>
</DIV></DIV>
<!-- Displayed code -->
<DIV STYLE="overflow:hidden; border:1px solid black; position:absolute;top:219; left:20; width:606px; height:90px; padding:1px; padding-left:25px; background-color:white; z-index:3;">
<SPAN CLASS="coder" ID="oCode"></SPAN>
<DIV CLASS="coder"></DIV>
</DIV></DIV>
<DIV ID="oControls" STYLE="position:absolute; top:250; left:0; width:100%; height:100px; background-color:gray; color:white; font-family:verdana; font-size:11; font-weight:normal; padding:10px; z-index:3; text-align:center; border:1px solid black; text-align:left;">
<DIV STYLE="padding-left:65px">
Modify the image using the selections below.<BR>
</DIV><HR>
<DIV ALIGN=CENTER>
<SELECT ID="percent" onchange="changeZoom2(percent); ">
<OPTION SELECTED>Use Percentage Value</OPTION>
<OPTION>10%</OPTION>
<OPTION>25%</OPTION>
<OPTION>50%</OPTION>
<OPTION>75%</OPTION>
<OPTION>100%</OPTION>
<OPTION>150%</OPTION>
<OPTION>200%</OPTION>
</SELECT>
<SELECT ID="normal" onchange="changeZoom2(normal); ">
<OPTION SELECTED>Use Number Value</OPTION>
<OPTION>.1</OPTION>
<OPTION>0.25</OPTION>
<OPTION>0.5</OPTION>
<OPTION>0.75</OPTION>
<OPTION>1.0</OPTION>
<OPTION>1.5</OPTION>
<OPTION>2.0</OPTION>
</SELECT><HR>
</DIV></DIV>
<MAP NAME="scaler">
<AREA SHAPE="rect" COORDS="0,182,19,199" ALT="plus" HREF="#"
onclick="zoomIn()" STYLE="cursor:hand">
<AREA SHAPE="rect" COORDS="1,1,18,15" ALT="minus" HREF="#"
onclick="zoomOut()">
</MAP>
</BODY>
</HTML>