The CSS order property of the Flexible elastic box model

Example

Set the order of flexbox object elements:

  1. div#myRedDIV {order:2;}
  2. div#myBlueDIV {order:4;}
  3. div#myGreenDIV {order:3;}
  4. div#myPinkDIV {order:1;}
复制
Effect preview

Browser support

The numbers in the table represent the version number of the first browser to support the property.

The number immediately following -webkit-, -ms- or -moz- is the first version that supports the prefixed property.

Attributes          
order 29.0
21.0 -webkit-
11.0 28.0
18.0 -moz-
9.0
6.1 -webkit-
17.0

Definition and Usage

The order property sets or retrieves the order in which the child elements of the flexbox model object appear. .

Note: The order property has no effect if the element is not an element of a flexbox object.

Default: Inherit: Animatable: Version: JavaScript Syntax:
0
no
Yes, see individual properties . See  CSS3 Animation Properties , CSS3 Animation ExamplesEffect preview
CSS3
object .style.order="2"  effect preview

 


CSS syntax

order:  number|initial|inherit;

attribute value

Value description
number The default value is 0. Specifies the order of flexible items.
initial Set this property to its default value. See  initial .
inherit This property is inherited from the parent element. See  inherit .

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326993544&siteId=291194637