如何在文本中居和对齐,就像在此图像中一样?(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
更多推荐
发布评论