
direction属性指定了网页中块级元素内文本的方向。
我们使用style属性在HTML中设置文本方向。style属性为块内的元素指定了内联样式。style属性与CSS属性direction一起使用,用于设置文本的方向。
语法
以下是使用CSS属性设置文本方向(从右到左)的语法。
<p style = "direction: rtl;">The text…</p>
示例
以下是在 HTML 中设置
传媒企业网站系统使用热腾CMS(RTCMS),根据网站板块定制的栏目,如果修改栏目,需要修改模板相应的标签。站点内容均可在后台网站基本设置中添加。全站可生成HTML,安装默认动态浏览。并可以独立设置SEO标题、关键字、描述信息。源码包中带有少量测试数据,安装时可选择演示安装或全新安装。如果全新安装,后台内容充实后,首页才能完全显示出来。(全新安装后可以删除演示数据用到的图片,目录在https://
元素方向的示例程序。
立即学习“前端免费学习笔记(深入)”;
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<p style = "direction: rtl;">
whiteboards are so often at the core of a collaborative process
</p>
</body>
</html>
示例
以下是在 HTML 中设置
元素方向的示例程序。
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<h2 style = "direction: rtl;">
Hallowen season it is...
</h2>
</body>
</html>
示例
以下是在HTML中设置
- 元素方向的示例程序。
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<ul style = "direction: rtl;">
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ul>
</body>
</html>










