HTML CSS Reference/CSS Attributes and Javascript Style Properties/writing mode

Материал из Web эксперт
Перейти к: навигация, поиск

"writing-mode" Example

    
<html>
<body>
<div id="myD" 
     style="width:100%; background-color:beige;">
This is sample text.
</div>
<br>
<input type="button" 
       value="Set writing Mode property to tb-rl" 
       onclick="myD.style.writingMode="tb-rl"">
<input type="button" 
       value="Set writingMode property to lr-tb"
       onclick="myD.style.writingMode="lr-tb"">
</body>
</html>



"writing-mode" is applied to

+----------------+--------------------------------------------------------------+
| Applied_To     |<a>                             <acronym>                     |
|                |<address>                       <b>                           |
|                |<big>                           <blockquote>                  |
|                |<button>                        <caption>                     |
|                |<center>                        <cite>                        |
|                |<code>                          currentStyle                  |
|                |<custom>                        <dd>                          |
|                |<del>                           <dfn>                         |
|                |<dir>                           <div>                         |
|                |<dl>                            <dt>                          |
|                |<em>                            <fieldset>                    |
|                |<font>                          <form>                        |
|                |<hn>                            <hr>                          |
|                |<i>                             <input>                       |
|                |<inputtype="button">            <input type="file">           |
|                |<input type="password">         <input type="reset">          |
|                |<input type="submit">           <input type="text">           |
|                |<ins>                           <isindex>                     |
|                |<kbd>                           <label>                       |
|                |<legend>                        <li>                          |
|                |<marquee>                       <menu>                        |
|                |<ol>                            <option>                      |
|                |<p>                             <pre>                         |
|                |<q>                             <rt>                          |
|                |<ruby>                          runtimeStyle                  |
|                |<s>                             <samp>                        |
|                |<small>                         <span>                        |
|                |<strike>                        <strong>                      |
|                |style                           <sub>                         |
|                |<sup>                           <td>                          |
|                |<textarea>                      <th>                          |
|                |<tt>                            <u>                           |
|                |<ul>                            <var>                         |
+----------------+--------------------------------------------------------------+



"writing-mode" Possible Values

Possible Values
lr-tb           default; left to right, top to bottom

tb-rl           Top to bottom, right to left; used in Asian writing



"writing-mode" Syntax and Note

Note:
Controls text writing direction.
Syntax:
    
element { writing-mode: value }
elementID.style.writingMode = "value"
document.all.elementID.style.writingMode = "value"