HTML DOM Style Object | HTML Style Tag | HTML Font Style

HTML DOM Style Object


 

Previous: HTML DOM Style opacity property

Next: HTML DOM Style outlineOffset property

Style Object Reference Style Objects

Examples

Flexible set the order of items:

document.getElementById("myRedDIV").style.order = "4";
document.getElementById("myBlueDIV").style.order = "3";
document.getElementById("myGreenDIV").style.order = "1";
document.getElementById("myPinkDIV").style.order = "2";


try it"


Definition and Usage

order attribute specifies a flexible project with respect to the order of the same flexible container for other items.

Note: If theelement is not flexible project, the order property does not work.


 

Firefox, Opera and Chrome support order property.


grammar

Returns order attributes:

object .style.order

Set the order attributes:

object .style.order="number|initial|inherit"

Property Value

描述
number 默认值是 0。规定灵活项目的顺序。
initial 设置该属性为它的默认值。请参阅 initial 。
inherit 从父元素继承该属性。请参阅 inherit 。