-moz-box-flex property | -webkit-box-flex property
-moz-box-flex: | ||||||
-webkit-box-flex: |
Specifies how an element grows to fill the box that contains it, relative to its siblings.
Only works for elements in a box object.
An element is a box object if the display property of the element has the value of
-moz-box (-webkit-box) or -moz-inline-box (-webkit-inline-box).
JavaScript page for this property: MozBoxFlex | webkitBoxFlex. You can find other example(s) there. |
Possible values:
One of the following values:
Integer, the priority of flexibility according to other elements. | |||||||
Takes the value of this property from the computed style of the parent element. |
Default: 0.
Example HTML code 1:
This example illustrates the use of the -moz-box-flex and the -webkit-box-flex properties:
|
||||
<head> <style> .box { display: -moz-inline-box; display: -webkit-inline-box; width: 250px; border: 5px solid red; } .flex1 { -moz-box-flex: 1; -webkit-box-flex: 1; background: green; } .flex2 { -moz-box-flex: 2; -webkit-box-flex: 2; background: cyan; } .flex3 { -moz-box-flex: 3; -webkit-box-flex: 3; background: orange; } </style> </head> <body> <div class="box"> <div class="flex1">flex 1</div> <div class="flex2">flex 2</div> <div class="flex3">flex 3</div> </div> </body> |
||||
|
||||
Did you find this example helpful?
|
Supported by tags:
a, abbr, acronym, address, b, bdo, big, blink, blockQuote, body, caption, center, cite, code, dd, del, dfn, dir, div, dl, dt, em, fieldSet, font, form, H1, H2, H3, H4, H5, H6, hr, html, i, iframe, ins, isIndex, kbd, label, legend, li, marquee, menu, ol, p, pre, s, samp, small, span, strike, strong, sub, sup, table, td, textArea, th, tr, tt, u, ul, var, q, xmp
Related pages:
External links:
User Contributed Comments