当前位置:首页 > 千层云服务器 > 正文

css如何字体翻转

在css中实现字体翻转的方法:1.创建p标签;2.使用direction和unicode-bidi属性设置字体翻转;

css如何字体翻转

在css中实现字体翻转的方法

1.首先,在页面中创建两个p标签,并添加文字用于对比;

<!DOCTYPEhtml>

<html>

<head>

<metacharset="utf-8"/>

<style></style>

</head>

<body>

<p>测试文本</p>

<pclass="nav">测试文本</p>

</body>

</body>

</html>

2.p标签创建好后,在css中使用direction和unicode-bidi属性即可设置字体翻转;

<!DOCTYPEhtml>

<html>

<head>

<metacharset="utf-8"/>

<style>

.nav{

direction:rtl;

unicode-bidi:bidi-override;

}

</style>

</head>

<body>

<p>测试文本</p>

<pclass="nav">测试文本</p>

</body>

</body>

</html>

效果:

css如何字体翻转

如果您对该产品感兴趣,请填写办理(客服微信:xiaoxiongyidong)

为您推荐:

发表评论

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

在线客服