开发者

Justify text with final line left-aligned

开发者 https://www.devze.com 2023-04-05 13:10 出处:网络
I\'ve got a client who wants a paragraph of text to appear justified and rather than having the last line flush left, they want it centered. I 开发者_StackOverflow社区haven\'t come up with a way to do

I've got a client who wants a paragraph of text to appear justified and rather than having the last line flush left, they want it centered. I 开发者_StackOverflow社区haven't come up with a way to do this yet that will properly scale if the page is resized by the user. Am I going to have to resort to some kind of javascript hack? I just feel like this is the sort of problem that I should be able to solve with CSS alone.


CSS3 has a text-align-last property that you might find useful. On the other hand, using a different text-justify method might be preferred.

0

精彩评论

暂无评论...
验证码 换一张
取 消