HTML/CSS/CSS Attributes and Javascript Style Properties/direction

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

"direction" Example

    
<html>
<body>
<input type="button" 
       onclick="myDiv.style.direction=event.srcElement.value;" 
       value="rtl"> 
<input type="button" 
       onclick="myDiv.style.direction=event.srcElement.value;" 
       value="ltr"> 
<div id=myDiv 
     style="background:aqua; padding:10px;" class="explanations">
Level is Level. 
Leve is not Level.
Not is toN
</div>
</body>
</html>



The direction Property

 

Value    Meaning
ltr      The text flows from left to right.
rtl      The text flows from right to left.
inherit   The text flows in the same direction as its parent element.