在HTML中使用dir属性可设置从右到左方向的段落。将rtl值添加到dir属性中,以从右到左放置文本。
您可以尝试运行以下代码以实现dir 属性-
<!DOCTYPE html> <html> <body> <p dir="rtl">This is demo paragraph. This is demo paragraph. This is demo paragraph. This is demo paragraph. This is demo paragraph. This is demo paragraph. This is demo paragraph.</p> </body> </html>