我如何可以对齐h1文本,使字符间距添加到拉伸到100%宽度? [英] How can I justify h1 text so that character spacing is added to stretch to 100% width?

查看:77
本文介绍了我如何可以对齐h1文本,使字符间距添加到拉伸到100%宽度?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将我的标题文本拉伸到给定的宽度,根据需要添加字符间距,以便该单词遍历整个h1。 text-align:justify似乎没有做到。标题只有一行。这是可能与CSS?

I'd like to stretch my header text to a given width, adding character spacing as necessary so that the word stretches across the entire h1. text-align:justify doesn't seem to do it. The header is only a single line. Is this possible with CSS?

推荐答案

CSS3支持text-justify:newspaper属性。但在大多数浏览器中将不支持。

CSS3 has support for the text-justify: newspaper property. It won't be supported in most browsers yet though.

同时,您可以尝试使用此jQuery 字符调整插件

In the mean time, you could try this jQuery Character Justification Plugin.

这篇关于我如何可以对齐h1文本,使字符间距添加到拉伸到100%宽度?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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