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

ตั้งค่าคุณสมบัติเส้นขอบบนทั้งหมดในบรรทัดเดียวด้วย CSS


คุณสมบัติ shorthand border-top

ใช้ border-top: thick dashed #FFFF00 ตั้งค่า width, style, color ของเส้นขอบบนพร้อมกัน

ตัวอย่าง

<!DOCTYPE html>
<html>
<head>
  <style>
    p {
      border-style: solid;
      border-top: thick dashed #FFFF00;
    }
  </style>
</head>
<body>
  <p>This is demo text</p>
</body>
</html>