【问题标题】:Beginner: Justify Text [duplicate]初学者:对齐文本[重复]
【发布时间】:2016-12-08 11:53:36
【问题描述】:

我是一名正在完成课堂作业的初学者,在尝试证明我的一个网站中的文本时遇到了一些困难。

如果有人能帮我解决这个问题,我将不胜感激!

HTML:

<div class="about__entry sm-two-thirds">
    <p>We believe in the power of authentic and genuine music, not manufactured artists. We believe in the freedom of music, expression, and creativity. We aim to give artists tools that will empower them to make the music they love and give them the ability to take their careers into their own hands.</p>
</div><!-- end .about__entry -->

CSS

.About__entry {
    text-align: justify;
    text-justify: inter-word;
    text-align-last:center;
}

【问题讨论】:

    标签: css text justify


    【解决方案1】:

    CSS 区分大小写,例如类名。

    About__entry != about__entry

    【讨论】:

    • 是的,刚刚看到!谢谢,谢谢! :)
    【解决方案2】:

    这是一个固定的例子:https://jsfiddle.net/v6L94v27/

    你只需要匹配类名的大小写(类名有一个大写的A)

    <div class="About__entry sm-two-thirds">
             <p>We believe in the power of authentic and genuine music, not manufactured artists. We believe in the freedom of music, expression, and creativity. We aim to give artists tools that will empower them to make the music they love and give them the ability to take their careers into their own hands.</p>
        </div><!-- end .about__entry -->
    

    【讨论】:

    • 感谢您的快速回复!我真的很感激!
    猜你喜欢
    • 1970-01-01
    • 2015-02-11
    • 2019-05-30
    • 2022-10-15
    • 2013-07-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多