如何在文本中居和对齐,就像在此图像中一样?(How do I center AND justify text, like in this image?)

系统教程 行业动态 更新时间:2024-06-14 17:03:52
如何在文本中居和对齐,就像在此图像中一样?(How do I center AND justify text, like in this image?)

我已经看了其他问题,但它们都是关于左对齐的正确文本的博客。 我正在努力的是将文本居中并在给定的宽度中证明它是正确的。

这是我目前的CSS代码块:

#body-container .intro p { top: 20px; width: 80%; margin: 0 auto; font-weight: 300; font-size: 32px; text-align: justify; }

有任何建议,非常感谢! :)

I've taken a look at the other questions, but they're all about centering a blog of left aligned justified text. What I'm struggling with is to center the text and also justify it in a given width.

This is my current block of CSS code:

#body-container .intro p { top: 20px; width: 80%; margin: 0 auto; font-weight: 300; font-size: 32px; text-align: justify; }

Any suggestions, thank you very much! :)

最满意答案

这不是一个真正的解决方案,因为它似乎是实验性的,只适用于Firefox和资源管理器:

-moz-text-align-last: center; text-align-last: center;

请参阅: https : //developer.mozilla.org/es/docs/CSS/text-align-last

It's not a real solution, as it seems this is experimental and only works in firefox and explorer:

-moz-text-align-last: center; text-align-last: center;

See: https://developer.mozilla.org/es/docs/CSS/text-align-last

更多推荐

本文发布于:2023-04-24 12:17:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/dzcp/2d9cf23c44bd416543d265b8d761a644.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:就像   在此   图像   如何在   文本中

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!