Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
top
Expand Minimize

zoom property

Specifies the magnification scale of the object.

Internet Explorer 9

 

Syntax

HRESULT value = object.put_zoom( v);HRESULT value = object.get_zoom(* p);

Property values

Type: VARIANT

normal (normal)

Default. Magnification scale is normal. The object renders normal size.

number (number)

Floating-point number that specifies the magnification scale, where 1.0 is normal.

percentage (percentage)

Integer, followed by a %. The value is a percentage of the magnification scale, where 100% is normal.

String format

normal | number | percentage

CSS information

Applies ToAll elements
Mediavisual
Inheritedno
Initial Valuenormal

Standards information

There are no standards that apply here.

Remarks

Windows Internet Explorer 8. The IHTMLCSSStyleDeclaration::zoom attribute is an extension to CSS, and can be used as a synonym for zoom in IE8 Standards mode.

Setting the value of the IHTMLCSSStyleDeclaration::zoom property on a rendered object causes the content that surrounds the object to reflow.

Even though the IHTMLCSSStyleDeclaration::zoom property is not inherited, it affects its children. This effect is similar to the transformation caused by the IHTMLBodyElement::background and IHTMLCSSStyleDeclaration::filter properties.

Examples

This example provides controls that let the user adjust the IHTMLCSSStyleDeclaration::zoom property.

Code example: http://samples.msdn.microsoft.com/workshop/samples/author/dhtml/refs/zoom.htm

In the HTML snippet below, the IHTMLCSSStyleDeclaration::zoom property is set to 100%.


<div style="zoom: 100%">
   <h1>Welcome to Seattle!</h1>
   <img src="seattlesmall.jpg">
   <p>A great city in the beautiful state of Washington.</p>
</div>


The image below shows the result.

An HTML element with the zoom property set to 100%

In this HTML snippet below, the IHTMLCSSStyleDeclaration::zoom property has been changed to 0.75.


<div style="zoom: 0.75">
   <h1>Welcome to Seattle!</h1>
   <img src="seattlesmall.jpg">
   <p>A great city in the beautiful state of Washington.</p>
</div>

The image below shows the result.

An HTML element with the zoom property set to 0.75

Requirements

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Mshtml.h

IDL

Mshtml.idl

DLL

Mshtml.dll

 

 

Community Additions

ADD
Show:
© 2015 Microsoft