gpt4 book ai didi

css - 如何使用 text-align "justify"右对齐 div 中的文本

转载 作者:太空宇宙 更新时间:2023-11-04 04:59:52 25 4
gpt4 key购买 nike

我希望文本的最后一句右对齐(文本的其余部分对齐)。

我尝试了 <span>在中间下方 <p>标记但没有成功:

span.activity-conclusion
{
font:22px 'Open Sans', "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
font-weight:200;
text-align:right;
color:#467FD9;
}

这就是 <div> 的 CSS 代码文本在哪里:

#activity-right { 
font:12px 'Open Sans', "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
font-weight:400;
padding-left:25px;
padding-top:20px;
height: 100%;
color:#000;
width: 60%;
float: left;
position: relative;
text-align:justify;
border-left: 1px dotted #666;
-moz-column-count: 1;
-moz-column-gap: 1.5em;
-moz-column-rule: 1px solid #c4c8cc;
-webkit-column-count: 1;
-webkit-column-gap: 1.5em;
-webkit-column-rule: 1px solid #c4c8cc;
}

最佳答案

text-align: justify;
text-align-last: right;

text-align-last是 CSS3 的一部分,可以在 Firefox 和 IE 中使用……不幸的是,还不能在 WebKit 中使用。

关于css - 如何使用 text-align "justify"右对齐 div 中的文本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11711540/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com