One
In the ordinary application of the use of CSS direction very little attention, today occasionally see the relevant content, only found that CSS direction used a lot of time is very convenient.
Second, we need to focus on two important elements:
direction:ltr;//This is the default value Direction:rtl
The LTR is the initial value, which means left-to-right, which is the meaning from left to right. RTL is another value, right-to-left abbreviation, is the meaning from right to left.
<p class= "RTL" ></p>
If P is set to direction as the TRL attribute, then 1.png will be on the right and 2.png on the left.
It is important to note that if the RTL attribute is set, the order of the text is unchanged:
<p class= "RTL" ><span>span1</span> <span>span2</span></p>
Because the change is only inline element block of the left and right order, all the text, even if the use of inline tags separated, in fact, or a homogeneous inline box, is treated as a whole, so, only approximate to the correct alignment effect, and the specific text does not have the left and the next order of change.
What is the" inline element block "? including replacement elements (replaced element), such as , <button>, <input>, <video>, <object>, etc., Or a inline-block level element. Therefore, the above span1, span2 example, only any one span setting display:inline-block, will see the changes in the left and right order.