如何中心 - 证明CSS中的文本? [英] How to Center-Justify text in CSS?

查看:81
本文介绍了如何中心 - 证明CSS中的文本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何中心对齐文本?

目前,justify不以最后一行为中心。

Currently, justify does not center the last line.

推荐答案

在Firefox中,它的工作原理是:

In Firefox, this works :

.center-justified {
    text-align: justify;
    -moz-text-align-last: center;
    text-align-last: center;
}

这里是一个兼容性表: https://developer.mozilla.org/en-US/docs/Web/CSS/text-align-last#浏览器兼容性。似乎在IE(无需前缀),但Webkit浏览器不支持它:(

Here is a compatibility table : https://developer.mozilla.org/en-US/docs/Web/CSS/text-align-last#Browser_compatibility. Seems to work in IE (no prefix needed), but Webkit browsers don't support it yet :(

这篇关于如何中心 - 证明CSS中的文本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆