คุณสมบัติCSS border-top-style
ตัวอย่าง
กำหนดสไตล์สำหรับเส้นขอบด้านบน:
div {border-top-style: dotted;}
ตัวอย่าง "ลองใช้เอง" เพิ่มเติมด้านล่าง
ความหมายและการใช้งาน
คุณสมบัติborder-top-style
กำหนดรูปแบบของเส้นขอบด้านบนขององค์ประกอบ
ค่าเริ่มต้น: | ไม่มี |
---|---|
รับการถ่ายทอด: | ไม่ |
เคลื่อนไหวได้: | ไม่. อ่านเกี่ยวกับแอนิเมชั่น |
รุ่น: | CSS1 |
ไวยากรณ์ JavaScript: | วัตถุ .style.borderTopStyle="dash" |
รองรับเบราว์เซอร์
ตัวเลขในตารางระบุเบราว์เซอร์รุ่นแรกที่สนับสนุนคุณสมบัติอย่างสมบูรณ์
Property | |||||
---|---|---|---|---|---|
border-top-style | 1.0 | 5.5 | 1.0 | 1.0 | 9.2 |
ไวยากรณ์ CSS
border-top-style: none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset|initial|inherit;
มูลค่าทรัพย์สิน
Value | Description | Play it |
---|---|---|
none | Specifies no border. This is default | |
hidden | The same as "none", except in border conflict resolution for table elements | |
dotted | Specifies a dotted border | |
dashed | Specifies a dashed border | |
solid | Specifies a solid border | |
double | Specifies a double border | |
groove | Specifies a 3D grooved border. The effect depends on the border-color value | |
ridge | Specifies a 3D ridged border. The effect depends on the border-color value | |
inset | Specifies a 3D inset border. The effect depends on the border-color value | |
outset | Specifies a 3D outset border. The effect depends on the border-color value | |
initial | Sets this property to its default value. Read about initial | |
inherit | Inherits this property from its parent element. Read about inherit |
ตัวอย่างเพิ่มเติม
ตัวอย่าง
ขอบบนเป็นเส้นประ:
div {border-top-style: dashed;}
ตัวอย่าง
ขอบบนที่เป็นของแข็ง:
div {border-top-style: solid;}
ตัวอย่าง
ขอบบนคู่:
div {border-top-style: double;}
ตัวอย่าง
ลบขอบด้านบน:
div {border-top-style: none;}
ตัวอย่าง
ขอบบนของร่อง:
div {
border-top-style: groove;
border-top-color: coral;
border-top-width: 7px;
}
ตัวอย่าง
ขอบบนสันเขา:
div {
border-top-style: ridge;
border-top-color: coral;
border-top-width: 7px;
}
ตัวอย่าง
แทรกขอบด้านบน:
div {
border-top-style: inset;
border-top-color: coral;
border-top-width: 7px;
}
ตัวอย่าง
ขอบบนเริ่มต้น:
div {
border-top-style: outset;
border-top-color: coral;
border-top-width: 7px;
}
หน้าที่เกี่ยวข้อง
กวดวิชา CSS: CSS Border
การอ้างอิง CSS: border-top คุณสมบัติ
การอ้างอิง HTML DOM: borderTopStyle คุณสมบัติ