Computer >> บทช่วยสอนคอมพิวเตอร์ >  >> การเขียนโปรแกรม >> JavaScript

ขีดเส้นใต้ข้อความด้วย CSS (text-decoration: underline)


คุณสมบัติ text-decoration

ใช้คุณสมบัติ text-decoration เพื่อขีดเส้นใต้ข้อความด้วย CSS

ตัวอย่าง

<html>
  <head>
  </head>
  <body>
    <p style="text-decoration:underline;">
      India </p>
  </body>
</html>

ค่าที่ใช้ได้ (CSS3):

  • line: underline, overline, line-through
  • style: solid, double, dotted, dashed, wavy
  • color: สีของเส้น
  • thickness: ความหนาของเส้น

รูปแบบใหม่: text-decoration: underline wavy blue 2px;