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

กำหนดรูปแบบของเส้นขอบด้านล่างโดยใช้ CSS


หากต้องการกำหนดลักษณะของเส้นขอบด้านล่าง ให้ใช้คุณสมบัติ border-bottom-style ค่าสำหรับเส้นขอบที่คุณกำหนดได้คือ จุด จุด สองเท่า เส้นประ ทึบ ฯลฯ

ตัวอย่าง

คุณสามารถลองเรียกใช้รหัสต่อไปนี้เพื่อจัดรูปแบบเส้นขอบด้านล่าง

<!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">Dotted bottom border.</p>
      <p class = "double">Double bottom border.</p>
      <p class = "dashed">Dashed bottom border.</p>
      <p class = "solid">Solid bottom border.</p>
      <p class = "inset">Inset bottom border.</p>
      <p class = "outset">Outset bottom border.</p>
   </body>
</html>

ผลลัพธ์

กำหนดรูปแบบของเส้นขอบด้านล่างโดยใช้ CSS