การแปลงข้อความ CSS


สารบัญ

    แสดงสารบัญ


การแปลงข้อความ

คุณสมบัติ text-transform ใช้เพื่อระบุตัวอักษรตัวพิมพ์ใหญ่และตัวพิมพ์เล็กในข้อความ

สามารถใช้เพื่อเปลี่ยนทุกอย่างให้เป็นตัวพิมพ์ใหญ่หรือตัวพิมพ์เล็กหรือ ใช้อักษรตัวพิมพ์ใหญ่ตัวแรกของแต่ละคำ:

ตัวอย่าง

p.uppercase {
  text-transform: uppercase;
}

p.lowercase {
  text-transform: lowercase;
}

p.capitalize {
  text-transform: capitalize;
}

ลองด้วยตัวคุณเอง →

<!DOCTYPE html>
<html>
<head>
<style>
p.uppercase {
  text-transform: uppercase;
}

p.lowercase {
  text-transform: lowercase;
}

p.capitalize {
  text-transform: capitalize;
}
</style>
</head>
<body>

<h1>Using the text-transform property</h1>

<p class="uppercase">This text is transformed to uppercase.</p>
<p class="lowercase">This text is transformed to lowercase.</p>
<p class="capitalize">This text is capitalized.</p>

</body>
</html>



คุณสมบัติการแปลงข้อความ CSS

text-transform

ควบคุมการใช้ตัวพิมพ์ใหญ่ของข้อความ