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

การตั้งค่าสไตล์เส้นขอบล่างด้วย CSS


คุณสมบัติ border-bottom-style

ใช้ border-bottom-style เพื่อกำหนดรูปแบบเส้นขอบล่าง ค่าที่ใช้ได้ ได้แก่ dotted, dashed, solid, double, inset, outset เป็นต้น

ตัวอย่าง

<!DOCTYPE html>
<html>
<head>
  <style>
    p.dotted { border-bottom-style: dotted; }
    p.double { border-bottom-style: double; }
    p.dashed { border-bottom-style: dashed; }
    p.solid  { border-bottom-style: solid; }
    p.inset  { border-bottom-style: inset; }
    p.outset { border-bottom-style: outset; }
  </style>
</head>
<body>
  <p class="dotted">เส้นขอบล่างแบบจุด</p>
  <p class="double">เส้นขอบล่างแบบคู่</p>
  <p class="dashed">เส้นขอบล่างแบบขีด</p>
  <p class="solid">เส้นขอบล่างแบบทึบ</p>
  <p class="inset">เส้นขอบล่างแบบเข้าใน</p>
  <p class="outset">เส้นขอบล่างแบบลุกออก</p>
</body>
</html>