1.
I rarely pay attention to the use of CSS direction in daily applications. Today I occasionally saw relevant content and found that CSS direction is often very convenient to use.
2. First of all, we need to pay attention to two important contents:
direction:ltr;//这个是默认值 direction:rtl
ltr is the initial value, which means left-to-right, which means from left to right.rtl is another value, the abbreviation of right-to-left, which means from right to left.
<p class="rtl"> <img src="/static/imghwm/default1.png" data-src="1.png" class="lazy" / alt="Detailed explanation on the use of direction in CSS" > <img src ="2.png"/ alt="Detailed explanation on the use of direction in CSS" > </p>
If you set the direction to p as the trl attribute, then 1.png will be on the right side. 2.png is on the left.
It should be noted that if the rtl attribute is set, the order of the text remains unchanged:
<p class="rtl"><span>span1</span> <span>span2</span></p>
Because only the left and right order of the inline element block is changed, all text, even if separated by inline tags, is actually , it is still a homogeneous inline box and is treated as a whole. Therefore, it only has an approximate right alignment effect, but there is no change in the left and right order of each text.
So what is an "inline element block"? Including replaced elements, such as ,
The above is the detailed content of Detailed explanation on the use of direction in CSS. For more information, please follow other related articles on the PHP Chinese website!

For a while, iTunes was the big dog in podcasting, so if you linked "Subscribe to Podcast" to like:

We lost Opera when they went Chrome in 2013. Same deal with Edge when it also went Chrome earlier this year. Mike Taylor called these changes a "Decreasingly

From trashy clickbait sites to the most august of publications, share buttons have long been ubiquitous across the web. And yet it is arguable that these

In this week's roundup, Apple gets into web components, how Instagram is insta-loading scripts, and some food for thought for self-hosting critical resources.

When I was looking through the documentation of git commands, I noticed that many of them had an option for . I initially thought that this was just a

Sounds kind of like a hard problem doesn't it? We often don't have product shots in thousands of colors, such that we can flip out the with . Nor do we

I like when websites have a dark mode option. Dark mode makes web pages easier for me to read and helps my eyes feel more relaxed. Many websites, including

This is me looking at the HTML element for the first time. I've been aware of it for a while, but haven't taken it for a spin yet. It has some pretty cool and


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Dreamweaver Mac version
Visual web development tools

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function

Atom editor mac version download
The most popular open source editor

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft

SublimeText3 Mac version
God-level code editing software (SublimeText3)