有没有办法同时使文本左对齐和两端对齐呢?类似于左对齐的两端对齐。有没有实现这一点的方法?谢谢帮助。
text-align: justify;
text-align-last: left;
text-align-last
属性。 - Pedro Uzcátegui左对齐意味着文本的左边缘对齐。两端对齐意味着文本的左边缘和右边缘都对齐。因此,“左对齐和两端对齐”与“两端对齐”没有任何区别,所以你的问题对我们来说毫无意义。
左对齐:
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.
也许您还想实现其他类型的对齐方式?“对齐”表示文本在两个边缘上对齐。然而,文本的最后一行仍将定位在左侧或右侧。
所以...
左对齐
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.
|
过去我没有使用过这个功能,所以我不确定CSS是否支持您想要的特定行为。不过,我认为W3Schools上的这个链接会有所帮助:http://www.w3schools.com/cssref/css3_pr_text-justify.asp