HTML CSS Reference/CSS Attributes and Javascript Style Properties/zoom

Материал из Web эксперт
Версия от 08:19, 26 мая 2010; Admin (обсуждение | вклад) (1 версия)
(разн.) ← Предыдущая | Текущая версия (разн.) | Следующая → (разн.)
Перейти к: навигация, поиск

"zoom" Example

    
<html>
<body>
<div id="myDiv" 
     style="width:100pt; 
            background-color:beige;">
www.wbex.ru
</div>
<button onclick="myDiv.style.zoom="200%"">Zoom 200%</button>
<button onclick="myDiv.style.zoom="100%"">Zoom 100%</button>
</body>
</html>



"zoom" is applied to

+----------------+--------------------------------------------------------------+
| Applied_To     |<a>                             <acronym>                     |
|                |<address>                       <applet>                      |
|                |<b>                             <bdo>                         |
|                |<big>                           <blockquote>                  |
|                |<body>                          <button>                      |
|                |<caption>                       <center>                      |
|                |<cite>                          <code>                        |
|                |<col>                           <colgroup>                    |
|                |currentStyle                    <custom>                      |
|                |<dd>                            <del>                         |
|                |<dfn>                           <dir>                         |
|                |<div>                           <dl>                          |
|                |<dt>                            <em>                          |
|                |<embed>                         <fieldset>                    |
|                |<font>                          <form>                        |
|                |<frame>                         <frameset>                    |
|                |<head>                          <hn>                          |
|                |<hr>                            <i>                           |
|                |<iframe>                        <img>                         |
|                |<input>                         <input type="button">         |
|                |<input type="checkbox">         <input type="file">           |
|                |<input type="hidden">           <input type="image">          |
|                |<input type="password">         <inputtype="radio">           |
|                |<input type="reset">            <input type="submit">         |
|                |<input type="text">             <ins>                         |
|                |<isindex>                       <kbd>                         |
|                |<label>                         <legend>                      |
|                |<li>                            <listing>                     |
|                |<marquee>                       <menu>                        |
|                |<nobr>                          <noframes>                    |
|                |<noscript>                      <object>                      |
|                |<ol>                            <option>                      |
|                |<p>                             <pre>                         |
|                |<q>                             <rt>                          |
|                |<ruby>                          runtimeStyle                  |
|                |<s>                             <samp>                        |
|                |<select>                        <small>                       |
|                |<span>                          <strike>                      |
|                |<strong>                        style                         |
|                |<sub>                           <sup>                         |
|                |<table>                         <tbody>                       |
|                |<td>                            <textarea>                    |
|                |<tfoot>                         <th>                          |
|                |<thead>                         <tr>                          |
|                |<tt>                            <u>                           |
|                |<ul>                            <var>                         |
|                |<xmp>                                                         |
+----------------+--------------------------------------------------------------+



"zoom" Possible Values

Possible Values
normal         default; normal HTML size.

number         A float value specifying the zoom; 1.0 is normal size.

percentage     Percentage. If greater than 100% the element is enlarged, 
                           if less than 100% the element is reduced; 
                           100% is normal size.



"zoom" Syntax and Note

Note:
How to zoom an element.
Syntax:
    
element { zoom: value }
elementID.style.zoom = "value"
document.all.elementID.style.zoom = "value"