CSS align-selfคุณสมบัติ
ตัวอย่าง
จัดตำแหน่งการจัดตำแหน่งสำหรับรายการใดรายการหนึ่งภายในองค์ประกอบที่ยืดหยุ่นได้:
#myBlueDiv
{
align-self: center;
}
ความหมายและการใช้งาน
คุณสมบัติระบุ การalign-self
จัดตำแหน่งสำหรับรายการที่เลือกภายในคอนเทนเนอร์แบบยืดหยุ่น
หมายเหตุ:คุณสมบัติalign-self
จะแทนที่คุณสมบัติ align-ites ของคอนเทนเนอร์
แบบยืดหยุ่น
ค่าเริ่มต้น: | รถยนต์ |
---|---|
รับการถ่ายทอด: | ไม่ |
เคลื่อนไหวได้: | ไม่. อ่านเกี่ยวกับแอนิเมชั่น |
รุ่น: | CSS3 |
ไวยากรณ์ JavaScript: | วัตถุ .style.alignSelf="center" |
รองรับเบราว์เซอร์
ตัวเลขในตารางระบุเบราว์เซอร์รุ่นแรกที่สนับสนุนคุณสมบัติอย่างสมบูรณ์
Numbers ตามด้วย -webkit- ระบุเวอร์ชันแรกที่ทำงานกับคำนำหน้า
Property | |||||
---|---|---|---|---|---|
align-self | 21.0 | 11.0 | 20.0 | 9.0 7.0 -webkit- |
12.1 |
ไวยากรณ์ CSS
align-self: auto|stretch|center|flex-start|flex-end|baseline|initial|inherit;
มูลค่าทรัพย์สิน
Value | Description | Play it |
---|---|---|
auto | Default. The element inherits its parent container's align-items property, or "stretch" if it has no parent container | |
stretch | The element is positioned to fit the container | |
center | The element is positioned at the center of the container | |
flex-start | The element is positioned at the beginning of the container | |
flex-end | The element is positioned at the end of the container | |
baseline | The element is positioned at the baseline of the container | |
initial | Sets this property to its default value. Read about initial | |
inherit | Inherits this property from its parent element. Read about inherit |
หน้าที่เกี่ยวข้อง
การอ้างอิง CSS: คุณสมบัติการจัดตำแหน่งเนื้อหา
การอ้างอิง CSS: align-items property
การอ้างอิง HTML DOM: alignSelf property