Home >Web Front-end >Front-end Q&A >What does rtl mean in css

What does rtl mean in css

WBOY
WBOYOriginal
2022-04-24 11:07:244009browse

In CSS, rtl is the abbreviation of "right-to-left", which means from right to left. It refers to the arrangement of inline content from right to left. It is an attribute of the direction attribute. Value; this attribute specifies the direction and writing direction of the text, and the syntax is "element {direction:rtl}".

What does rtl mean in css

The operating environment of this tutorial: Windows 10 system, CSS3&&HTML5 version, Dell G3 computer.

What does rtl mean in css

rtl, the abbreviation of right-to-left, means from right to left. To describe it more specifically, the inline content is from right to left. Arrangement, adding and applying this CSS statement, then the two images before and after, by default, the one with DOM in front will be displayed on the right; and it is at the right end of the container.

The direction attribute specifies the direction/writing direction of the text.

This attribute specifies the basic writing direction of the block, as well as the embedding and overlaying directions for the Unicode bidirectional algorithm. User agents that do not support bidirectional text may ignore this attribute.

Possible values ​​for this attribute are:

What does rtl mean in css

ltr is the initial value, which means left-to-right, which means from left to right. More specific The description is that the inline content is arranged from left to right. This is how we usually process web pages. For example, if there are two pictures before and after, by default, the one with the DOM first is displayed on the left.

The example is as follows:

<html>
<head>
<style type="text/css">
div.one
{direction:rtl}
div.two
{
direction: ltr
}
</style>
</head>
<body>
<div class="one">Some text. Right-to-left direction.</div>
<div class="two">Some text. Left-to-right direction.</div>
</body>
</html>

Output result:

What does rtl mean in css

(Learning video sharing: css video tutorial)

The above is the detailed content of What does rtl mean in css. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn