在 HTML5 中创建从右到左的段落
htmlweb developmentfront end technology更新于 2025/8/14 23:08:17
使用 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>
相关文章
有用资源
html 参考教程 - 该教程包含有关 html 的更多信息:https://www.cainiaomax.com/html/

