6

有没有办法让文本左对齐并同时证明?意思是左对齐。有什么办法可以做到这一点?感谢帮助。

4

5 回答 5

20

您可能正在寻找最后一行的左对齐:

  text-align: justify;
  text-align-last: left;
于 2017-04-06T11:57:28.120 回答
10

左对齐意味着文本的左边缘对齐。对齐文本意味着文本的左边缘和右边缘都对齐。所以“左对齐和对齐”与“对齐”没有什么不同,所以你的问题对我们没有任何意义。

左对齐:

Four-score and seven years ago, our fathers 
brought forth on this continent a new nation, 
conceived in liberty, and dedicated to the 
proposition that all men are created equal.

有理:

Four-score  and  seven years  ago, our fathers 
brought forth on this continent a  new nation, 
conceived  in  liberty, and  dedicated to  the 
proposition that all men are created equal.

右对齐:

  Four-score and seven years ago, our fathers 
brought forth on this continent a new nation, 
   conceived in liberty, and dedicated to the 
  proposition that all men are created equal.

也许您正在尝试实现其他类型的对齐?

于 2012-07-02T02:25:34.143 回答
7

两端对齐意味着文本在两边对齐。但是,文本的最后一行仍将位于左侧或右侧。

所以...

左对齐

Lorem Ipsum is simply dummy text of the printing and       |
typesetting industry. Lorem Ipsum has been the industry's  |
standard dummy text ever since the 1500s, when an unknown  |
printer took a galley of type and scrambled it to make a   |
type specimen book.                                        |

左对齐

                                                           |
Lorem  Ipsum  is  simply  dummy  text  of  the printing  and 
typesetting  industry. Lorem  Ipsum has been  the industry's 
standard dummy  text ever since  the 1500s, when  an unknown 
printer took  a galley of type  and scrambled  it to make  a 
type specimen book.                                        |
                                                           |

右对齐

                                                           |
Lorem  Ipsum  is  simply  dummy  text  of  the printing  and 
typesetting  industry. Lorem  Ipsum has been  the industry's 
standard dummy  text ever since  the 1500s, when  an unknown 
printer took  a galley of type  and scrambled  it to make  a 
                                         type specimen book.
                                                           |

我过去没有用过这个,所以我不能 100% 确定你想要的这种特殊行为是否被 CSS 支持。不过,我认为 W3Schools 的这个链接会有所帮助: http: //www.w3schools.com/cssref/css3_pr_text-justify.asp

于 2012-07-03T03:45:36.773 回答
3

两端对齐的文本总是“左右两端对齐”。

于 2012-07-02T02:15:35.743 回答
3

这是一个图像,它同时具有左对齐(左上)和对齐(右上)的文本。

在此处输入图像描述

要获得您将text-align: justify;在 css 中使用的左对齐文本。

在最新版本的 Chrome 和 IE 中,您会得到对齐的文本,最后一行使用该 css 左对齐。我不确定旧版浏览器如何处理它。

您在 Photoshop 中获得 4 种类型的对齐文本,完全对齐或最后一行左对齐、居中或右对齐,但浏览器似乎只支持左对齐。对于从右到左的语言,它们可能具有右对齐文本。

于 2016-04-08T23:58:11.850 回答