css两端对齐属性”text-align:justify”

text-align:justify 属性是全兼容的,使用它实现两端对齐,需要注意在模块之间添加[空格/换行符/制表符]才能起作用,同样,实现文本对齐也是需要在字与字之间添加[空格/换行符/制表符]才能起作用。


images

更多text-align属性justify取值示例,认真看下面两个方框的两边!

images

上面的内容就对应着下面的代码,修改代码,并点运行,查看一下效果吧!

[runcode]< !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">



CSS text-align属性 justify 取值示例


The purpose of the text-align is aligns text. Do you know?The justify value of the text-align can lined up with the paragraph's margin on both the left and right sides of each line of text.

The purpose of the text-align is aligns text. Do you know?The justify value of the text-align can lined up with the paragraph's margin on both the left and right sides of each line of text.可以使每行的文字紧挨容器(本例中的容器就是指容纳这段文字的段落)的两边.


[/runcode]