Text-align: justify can only align the two ends of non-last rows in multiple rows. I can't help myself with a single line. ie has text-justify to solve the problem. For non-ie, my method is junk, because it is only used in special cases.
Example source code [www.52css.com]
. Justify {
Height: 1.1em;
Overflow: hidden;
Text-align: justify;
Text-justify: distribute-all-lines;
}
Div.cn: After {
Content :"__________________________________________";
Font-size: 100px;
}
By the way, I use content and add content to the second line to align the two ends of the first line.
However, different browsers have different understandings of Chinese. Firefox separates Chinese characters directly, and opera does not separate Chinese characters. It only recognizes spaces. If a Chinese character is entered with a half-width English or number, Safari is close to opera. It cannot be divided without spaces.
The English is better, because we can only use spaces to separate words, but ie uses text-justify: distribute-all-lines to separate words. I used to think about how to use HTC or js to help IE, but I found that IE6 is so stupid that I don't know how to use IE7 at home.
Or it is better to press the space, but Firefox, a browser that only zooms in the text, is XX. The bad method I wrote is only useful under certain conditions, think of one sentence: cherish life and stay away from firefix!