Latest web development tutorials

HTML DOM Style flexWrap property

Style Object Reference Style Objects

Examples

Let Flexible project when necessary demolition line:

document.getElementById("main".style.flexWrap="wrap";

try it"

Definition and Usage

flexWrap attribute specifies flexible project is split row or column split.

Note: If theelement is not flexible items, flexWrap property does not work.


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

Firefox, Opera and Chrome support flexWrap property.


grammar

Back flexWrap properties:

object .style.flexWrap

Setting flexWrap properties:

object .style.flexWrap="nowrap|wrap|wrap-reverse|initial|inherit"

Property Value

描述
nowrap 默认值。规定灵活的项目不拆行或不拆列。
wrap 规定灵活的项目在必要的时候拆行或拆列。
wrap-reverse 规定灵活的项目在必要的时候拆行或拆列,但是以相反的顺序。
initial 设置该属性为它的默认值。请参阅 initial
inherit 从父元素继承该属性。请参阅 inherit

technical details

Defaults: nowrap
return value: String representing the flex-wrap attribute element.
CSS version CSS3


related articles

CSS Reference Manual: Flex-wrap property

HTML DOM STYLE Reference: Flex Properties

HTML DOM STYLE Reference: flexBasis property

HTML DOM STYLE Reference: flexDirection property

HTML DOM STYLE Reference: FlexFlow property

HTML DOM STYLE Reference: flexGrow property

HTML DOM STYLE Reference: flexShrink property


Style Object Reference Style Objects