CSS text-justify 属性

Definition and usage

The text-justify property specifies the alignment of the text when the text-align setting is set to "justify".

Ang katangian na ito ay nagtutukoy kung paano ayusin at hatiin ang teksto ng linya.

Example

Change the word spacing of alignment:

div
{
text-align:justify;
text-justify:inter-word;
}

Try it yourself

CSS syntax

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

Attribute value

Value Description Test
auto The browser decides the alignment algorithm. Test
none Disable alignment. Test
inter-word Increase/decrease the spacing between words. Test
inter-ideograph Align the content using semantic text. Test
inter-cluster Align only the content that does not contain internal word spacing (such as Asian languages). Test
distribute Tulad sa pahina ng pahayagan, maliban sa huling linya sa Hapones, Korean, at Chinese language families na ayaw magkakalaban. Test
kashida Align the content by stretching the characters. Test

Technical details

Default value: auto
Inherits: yes
Versyon: CSS3
JavaScript syntax: object.style.textJustify="inter-word"

Suporta ng browser

Ang mga numero sa talahanayan ay naglalarawan ng unang bersyon ng browser na ganap na sumusuporta sa katangian na ito.

Chrome IE / Edge Firefox Safari Opera
Sumusuporta * 11.0 55.0 10.0.3 Sumusuporta *

* Ang pag-andar ng paraan na ito ay matatagpuan sa pagpipilian ng "I-enable experimental Web Platform features" (dapat ay itakda na "Enabled"). Kung nais mong baguhin ang mga pagpipilian sa Chrome: mag-type ka ng "chrome://flags" sa Chrome browser. Kung nais mong baguhin ang mga pagpipilian sa Opera: mag-type ka ng "flags" sa Opera browser.