CSS ทรัพย์สินทั้งหมด
ตัวอย่าง
เปลี่ยนคุณสมบัติทั้งหมดที่ใช้กับองค์ประกอบหรือองค์ประกอบหลักเป็นค่าเริ่มต้น:
div
{
background-color: yellow;
color: red;
all: initial;
}
ความหมายและการใช้งาน
คุณสมบัติจะall
รีเซ็ตคุณสมบัติทั้งหมด ยกเว้น unicode-bidi และทิศทาง เป็นค่าเริ่มต้นหรือค่าที่สืบทอดมา
ค่าเริ่มต้น: | ไม่มี |
---|---|
รับการถ่ายทอด: | ไม่ |
เคลื่อนไหวได้: | ไม่. อ่านเกี่ยวกับแอนิเมชั่น |
รุ่น: | CSS3 |
ไวยากรณ์ JavaScript: | วัตถุ .style.all="เริ่มต้น" |
รองรับเบราว์เซอร์
ตัวเลขในตารางระบุเบราว์เซอร์รุ่นแรกที่สนับสนุนคุณสมบัติอย่างสมบูรณ์
Property | |||||
---|---|---|---|---|---|
all | 37.0 | 79.0 | 27.0 | 9.1 | 24.0 |
ไวยากรณ์ CSS
all: initial|inherit|unset;
มูลค่าทรัพย์สิน
Value | Description |
---|---|
initial | Changes all the properties applied to the element or the element's parent to their initial value |
inherit | Changes all the properties applied to the element or the element's parent to their parent value |
unset | Changes all the properties applied to the element or the element's parent to their parent value if they are inheritable or to their initial value if not |