Computer >> คอมพิวเตอร์ >  >> การเขียนโปรแกรม >> CSS

text-justify คุณสมบัติใน CSS


คุณสมบัติ text-justify ใน CSS ใช้เพื่อตั้งค่าวิธีการจัดข้อความเมื่อตั้งค่าคุณสมบัติ text-align เป็นค่า justify ต่อไปนี้เป็นค่าคุณสมบัติ -

text-justify: auto|inter-word|inter-character|none|initial|inherit;

ตัวอย่าง

ให้เรามาดูตัวอย่างการใช้คุณสมบัติ text-justify ใน CSS −

<!DOCTYPE html>
<html>
<head>
<style>
div {
   text-align: justify;
   text-justify: inter-word;
   color: white;
   background-color: gray;
}
</style>
</head>
<body>
<h2>Demo Heading</h2>
<div>This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. </div>
</body>
</html>

ผลลัพธ์

text-justify คุณสมบัติใน CSS

ตอนนี้ ปรับขนาดเบราว์เซอร์ -

text-justify คุณสมบัติใน CSS