Home  >  Article  >  Web Front-end  >  How to use css3 text-justify attribute

How to use css3 text-justify attribute

青灯夜游
青灯夜游Original
2019-02-11 16:18:003267browse

The text-justify attribute is used to specify the alignment method when the text alignment attribute text-align is set to "justify"; this attribute specifies how to align and separate lines of text.

How to use css3 text-justify attribute

CSS3 text-justify attribute

The text-justify attribute specifies that the text alignment is set to "justify" justification, specifying how text should be aligned and spaced.

Syntax:

text-justify: auto|inter-word|inter-ideograph|inter-cluster|distribute|kashida|trim;

Parameters:

auto: The browser determines the parallel algorithm.​

none: Disable all rows.​ ​

inter-word: Increase/decrease the interval between words. Align text by adjusting the spacing between words, effectively creating additional word spacing. This is actually a variation of the word-spacing attribute.

inter-ideograph: Use ideographic text to align content.

inter-cluster: Only arrange content that does not contain internal word gaps (such as Asian languages).

distribute: Similar to a newspaper layout, except that the last line is not aligned in East Asian languages.​

kashida: Arrange content by stretching characters.​

Note: Only Internet Explorer supports the text-justify attribute.

CSS3 Example of using the text-justify attribute

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<style>
div
{
text-align:justify;
text-justify:inter-word;
}
</style>
</head>
<body>
<h1>CSS text-justify 实例</h1>
<div>php中文网</div>
<p><b>提示:</b>请调整浏览器窗口的大小,来查看齐行效果。</p>
</body>

Rendering:

How to use css3 text-justify attribute

The above is the detailed content of How to use css3 text-justify attribute. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn