提交 5f1935f7 编写于 作者: E ester.zhou

update docs

Signed-off-by: Nester.zhou <ester.zhou@huawei.com>
上级 98fc7a57
# Universal Styles<a name="EN-US_TOPIC_0000001173324679"></a>
# Universal Styles
You can set component appearance in the **style** attribute or **.css** files.
> **NOTE**<br>
> Universal styles are supported since API version 4. Updates will be marked with a superscript to indicate their earliest API version.
You can set universal styles for components in the **style** attribute or **.css** files.
| Name | Type | Default Value | Description |
| ---------------------------------------- | ---------------------------------------- | ------------ | ---------------------------------------- |
| width | \<length> \| \<percentage> | - | Component width.<br>If this attribute is not set, the width required for the element content is used.<br> |
| height | \<length> \| \<percentage> | - | Component height.<br>If this attribute is not set, the height required for the element content is used.<br> |
| min-width<sup>5+</sup> | \<length> \| \<percentage><sup>6+</sup> | 0 | Minimum component width. |
| min-height<sup>5+</sup> | \<length> \| \<percentage><sup>6+</sup> | 0 | Minimum component height. |
| max-width<sup>5+</sup> | \<length> \| \<percentage><sup>6+</sup> | - | Maximum component width, which has no restriction by default. |
| max-height<sup>5+</sup> | \<length> \| \<percentage><sup>6+</sup> | - | Maximum component height, which has no restriction by default. |
| padding | \<length> \| \<percentage><sup>5+</sup> | 0 | Shorthand attribute to set the padding for all sides in a declaration.<br>The attribute can have one to four values:<br>- If you set only one value, it specifies the padding for all the four sides.<br>- If you set two values, the first value specifies the top and bottom padding, and the second value specifies the left and right padding.<br>- If you set three values, the first value specifies the top padding, the second value specifies the left and right padding, and the third value specifies the bottom padding.<br>- If you set four values, they respectively specify the padding for top, right, bottom, and left sides (in clockwise order).|
| padding-[left\|top\|right\|bottom] | \<length> \| \<percentage><sup>5+</sup> | 0 | Left, top, right, and bottom padding. |
| padding-[start\|end] | \<length> \| \<percentage><sup>5+</sup> | 0 | Start and end padding. |
| margin | \<length> \| \<percentage><sup>5+</sup> | 0 | Shorthand attribute to set the margin for all sides in a declaration. The attribute can have one to four values:<br>- If you set only one value, it specifies the margin for all the four sides.<br>- If you set two values, the first value specifies the top and bottom margins, and the second value specifies the left and right margins.<br>- If you set three values, the first value specifies the top margin, the second value specifies the left and right margins, and the third value specifies the bottom margin.<br>- If you set four values, they respectively specify the margin for top, right, bottom, and left sides (in clockwise order).|
| margin-[left\|top\|right\|bottom] | \<length> \| \<percentage><sup>5+</sup> | 0 | Left, top, right, and bottom margins. |
| margin-[start\|end] | \<length> \| \<percentage><sup>5+</sup> | 0 | Start and end margins. |
| border | - | 0 | Shorthand attribute to set all borders. Set **border-width**, **border-style**, and **border-color** in sequence. Default values are used for attributes that are not set.|
| border-style | string | solid | Shorthand attribute to set the style for all borders. Available values are as follows:<br>- **dotted**: dotted border. The radius of a dot is half of **border-width**.<br>- **dashed**: dashed border.<br>- **solid**: solid border.|
| border-[left\|top\|right\|bottom]-style | string | solid | Styles of the left, top, right, and bottom borders. The available values are **dotted**, **dashed**, and **solid**.|
| border-[left\|top\|right\|bottom] | - | - | Shorthand attribute to set the borders for every side respectively. Set **border-width**, **border-style**, and **border-color** in sequence. Default values are used for attributes that are not set.|
| border-width | \<length> | 0 | Shorthand attribute to set the width for all borders, or separately set the width for each border. |
| border-[left\|top\|right\|bottom]-width | \<length> | 0 | Attribute to set widths of left, top, right, and bottom borders. |
| border-color | \<color> | black | Shorthand attribute to set the color for all borders, or separately set the color for each border. |
| border-[left\|top\|right\|bottom]-color | \<color> | black | Attribute to set colors for left, top, right, and bottom borders. |
| border-radius | \<length> | - | Attribute to set the radius for round borders of an element. This attribute cannot be used to set the width, color, or style of a specific border. To set the width or color, you need to set **border-width**, **border-color**, or **border-style** for all the borders at the same time.<br>In the four-value syntax, the values apply to lower-left corner, lower-right corner, upper-left corner, and upper-right corner, respectively.|
| border-[top\|bottom]-[left\|right]-radius | \<length> | - | Attribute to respectively set the radii of upper-left, upper-right, lower-right, and lower-left rounded corners |
| background | \<linear-gradient> | - | Background. This attribute supports [gradient styles](../arkui-js/js-components-common-gradient.md) only and is not compatible with **background-color** or **background-image**.|
| background-color | \<color> | - | Background color. |
| background-image | string | - | Background image. Both online and local image resources are supported. Currently, this attribute is not compatible with **background-color** or **background**.<br>Example:<br>- background-image: url("/common/background.png")<br>The SVG format is not supported.|
| background-size | - string<br>- \<length> \<length><br>- \<percentage> \<percentage> | auto | Background image size.<br>- The **string** values are as follows:<br> - **contain**: Expands the image to the maximum size so that its height and width are fully applicable to the content area.<br> - **cover**: Extends the background image to a large enough size so that it completely covers the background area. Some parts of the image may not be displayed in the background area.<br> - **auto**: Retains the original aspect ratio of the image.<br>- The two **<length>** values are as follows:<br> Width and height of the background image. The first value indicates the width, and the second value indicates the height. If you only set one value, the other value is set to **auto** by default.<br>- The two **<percentage>** values are as follows:<br> Width and height of the background image in percentage of the parent element. The first value indicates the width, and the second value indicates the height. If you only set one value, the other value is set to **auto** by default.|
| background-repeat | string | repeat | How a background image is repeatedly drawn. By default, a background image is repeated both horizontally and vertically.<br>- **repeat**: The image is repeated along the x-axis and y-axis at the same time.<br>- **repeat-x**: The image is repeated along the x-axis.<br>- **repeat-y**: The image is repeated along the y-axis.<br>- **no-repeat**: The image is not repeated.|
| background-position | - string string<br>- \<length> \<length><br>- \<percentage> \<percentage> | 0px 0px | - Using keywords: If only one keyword is specified, the other value is **center** by default. The two values define the horizontal position and vertical position, respectively.<br> - **left**: leftmost in the horizontal direction.<br> - **right**: rightmost in the horizontal direction.<br> - **top**: top in the vertical direction.<br> - **bottom**: bottom in the vertical direction.<br> - **center**: center position.<br>- Using **<length>**: The first value indicates the horizontal position, and the second value indicates the vertical position. For the upper left corner, the value is **0 0**. The unit is pixel. If only one value is specified, the other one is **50%**.<br>- Using **\<percentage>**: The first value indicates the horizontal position, and the second value indicates the vertical position. **0% 0%** indicates the upper left corner. **100% 100%** indicates the lower right corner. If only one value is specified, the other one is **50%**.<br>- Using both **\<percentage>** and **\<length>**. |
| box-shadow<sup>5+</sup> | string | 0 | Syntax: **box-shadow: h-shadow v-shadow blur spread color**<br>Shadow style of the current component. The value includes the horizontal position (mandatory), vertical position (mandatory), fuzzy radius (optional, default value: **0**), extension distance (optional, default value: **0**), and color (optional, default value: **black**) of the shadow.<br>Example:<br>- box-shadow :10px 20px 5px 10px \#888888<br>- box-shadow :100px 100px 30px red<br>- box-shadow :-100px -100px 0px 40px |
| filter<sup>5+</sup> | string | - | Syntax: **filter: blur(px)**<br>Radius of the blur area within the component layout. If this style is not set, the default value **0** (no blur) is used. Percentage values are not supported.<br>Example:<br>- filter: blur(10px) |
| backdrop-filter<sup>5+</sup> | string | - | Syntax: **backdrop-filter: blur(px)**<br>Radius of the background blur area within the component layout. If this style is not set, the default value **0** (no blur) is used. Percentage values are not supported.<br>Example:<br>- backdrop-filter: blur(10px) |
| window-filter<sup>5+</sup> | string | - | Syntax: window-filter: blur(percent), style<sup>5+</sup><br>Blur degree and style for windows within the component layout. If this style is not set, the default value **0%** (no blur area) is used. Different blur degrees and styles for multiple blur areas are not supported. Available blur styles are as follows: **small_light** (default value), **medium_light**, **large_light**, **xlarge_light**, **small_dark**, **medium_dark**, **large_dark**, and **xlarge_dark**.<br>Example:<br>- window-filter: blur(50%)<br>- window-filter: blur(10%), large_light |
| opacity | number | 1 | Opacity of an element. The value ranges from **0** to **1**. The value **1** means opaque, and **0** means completely transparent. |
| display | string | flex | Type of the box containing an element. Available values are as follows:<br>- **flex**: Flexible layout.<br>- **none**: The box is disabled.<br>- **inline**<sup>9+</sup>: Inline box, where the element is displayed as an inline element and does not start on a new line.<br>- **block**<sup>9+</sup>: Block box, where the element is displayed as a block-level element and always starts on a new line. This is the default value for container components.<br>- **inline-block**<sup>9+</sup>: Inline-block box, where the element is displayed on one line and you can set a width and height on the element. This is the default value for basic components.|
| visibility | string | visible | Whether to display the box containing an element. The invisible box occupies layout space. (To remove the box, set the **display** attribute to **none**.) Available values are as follows:<br>- **visible**: The element is visible.<br>- **hidden**: The box is hidden but still takes up space.<br>If both **visibility** and **display** are set, only **display** takes effect.|
| flex | number \| string | - | How to divide available space of the parent component for each child component.<br>You can set one, two<sup>5+</sup>, or three<sup>5+</sup> values for this style.<br>Set one value in either of the following ways:<br>- A unitless number to set **flex-grow**.<br>- A valid width value<sup>5+</sup> to set **flex-basis**.<br>Set two values<sup>5+</sup> in the following ways:<br>The first value must be a unitless number used to set **flex-grow**. The second value must be either of the following:<br>- A unitless number to set **flex-shrink**.<br>- A valid width value to set **flex-basis**.<br>Set three values<sup>5+</sup> in the following ways:<br>The first value must be a unitless number used to set **flex-grow**. The second value must be a unitless number used to set **flex-shrink**. The third value must be a valid width value used to set **flex-basis**.<br>This style takes effect only when the container is any of the following components: **\<div>**, **\<list-item>**, **\<tabs>**, **\<refresh>**, and **\<stepper-item><sup>5+</sup>**.|
| flex-grow | number | 0 | How much a child component will grow. The value specifies allocation of the remaining space on the main axis of the parent component. Size of available space = Container size - Total size of all child components. Value **0** indicates that the child component does not grow.<br>This style takes effect only when the container is any of the following components: **\<div>**, **\<list-item>**, **\<tabs>**, **\<refresh>**, and **\<stepper-item><sup>5+</sup>**.|
| flex-shrink | number | 1 | How much a child component will shrink. The shrink occurs only when the sum of default child component widths is greater than that of the parent component. Value **0** indicates that the child component does not shrink.<br>This style takes effect only when the container is any of the following components: **\<div>**, **\<list-item>**, **\<tabs>**, **\<refresh>**, and **\<stepper-item><sup>5+</sup>**.|
| flex-basis | \<length> | - | Initial length of the flex item on the main axis.<br>This style takes effect only when the container is any of the following components: **\<div>**, **\<list-item>**, **\<tabs>**, **\<refresh>**, and **\<stepper-item><sup>5+</sup>**.|
| align-self<sup>6+</sup> | string | - | Alignment mode on the cross axis of the parent element. This style overwrites the align-items style of the parent element. The align-items style is used only in the div and list styles of the parent container. Available values are as follows:<br>- **stretch**: Items are stretched to the same height or width as the container in the cross axis direction.<br>- **flex-start**: Items are aligned to the start of the cross axis.<br>- **flex-end**: Items are aligned to the end of the cross axis.<br>- **center**: Items are aligned in the center of the cross axis.<br>- **baseline**: Items are aligned on the peracross axis.|
| position | string | relative | Positioning type of an element. Dynamic changes are not supported.<br>- **fixed**: The element is positioned related to the browser window.<br>- **absolute**: The element is positioned absolutely to its parent element. The setting takes effect only when the parent component is **\<div>** or **\<stack>**.<br>- **relative**: The element is positioned relative to its normal position.|
| [left\|top\|right\|bottom] | \<length> \| \<percentage><sup>6+</sup> | - | **left &#x7C; top &#x7C; right &#x7C; bottom** must be used together with **position** to determine the offset of an element.<br/>- The **left** attribute specifies the left edge position of the element. This attribute defines the offset between the left edge of the margin area of a positioned element and left edge of its containing block.<br/>- The **top** attribute specifies the top edge position of the element. This attribute defines the offset between the top edge of a positioned element and that of a block included in the element.<br/>- The **right** attribute specifies the right edge position of the element. This attribute defines the offset between the right edge of a positioned element and that of a block included in the element.<br/>- The **bottom** attribute specifies the bottom edge position of the element. This attribute defines the offset between the bottom edge of a positioned element and that of a block included in the element. |
| [start \| end]<sup>6+</sup> | \<length> \| \<percentage> | - | **start &#x7C; end** must be used together with **position** to determine the offset of an element.<br/>- The **start** attribute specifies the start edge position of the element. This attribute defines the offset between the start edge of a positioned element and that of a block included in the element.<br/>- The **end** attribute specifies the end edge position of the element. This attribute defines the offset between the end edge of a positioned element and that of a block included in the element. |
| z-index<sup>6+</sup> | number | - | Rendering sequence of child nodes under the same parent node. A child node with a larger value will be rendered later.<br>z-index does not support auto, and other styles such as opacity do not affect the rendering sequence of z-index.|
| image-fill<sup>6+</sup> | \<color> | - | Fill color for SVG images. The following components are supported: **button** (icon attribute), **piece** (icon attribute), **search** (icon attribute), **input** (headericon attribute), **textarea** (headericon attribute), **image** (src attribute), and **toolbar-item** (icon attribute)<br>The **fill** color value in the SVG image file is replaced with the value of **image-fill** during rendering, and is valid only for the fill attribute that is declared in the SVG image.|
| clip-path<sup>6+</sup> | [ \<geometry-box> \|\| \<basic-shape> ] \| none | - | Clip area of a component. Only the content within this area is displayed.<br>**\<geometry-box>**: applicable scope of the clip area's width and height. The default value is **border-box**. Available values are as follows:<br>- **margin-box**: The width and height includes the margin.<br>- **border-box**: The width and height includes the border.<br>- **padding-box**: The width and height includes the padding.<br>- **content-box**: The width and height does not include any margin, border, or padding.<br>- **\<basic-shape>**: shape of the clip area. Available values include:<br>- **inset**, in the format of inset( \<percentage>{1,4} [ round \<'border-radius'> ]? ).<br>- **circle**, in the format of circle( [ \<percentage> ]? [ at \<percentage> \<percentage> ]? ).<br>- **ellipse**, in the format of ellipse( [ \<percentage>{2} ]? [ at \<percentage> \<percentage> ]? ).<br>- **polygon**, in the format of polygon( [ \<percentage> \<percentage> ]\# ).<br>- **path**, in the format of path( \<string> ).|
| mask-image<sup>6+</sup> | - \<linear-gradient><br>- string | - | Image used for the mask of a component:<br>Gradient color mask, for example:<br>linear-gradient(to left, black, white)<br>Solid color mask, for example:<br>linear-gradient(to right, grey , grey)<br>Mask filled by a local SVG image, for example, **url(common/mask.svg)**|
| mask-size<sup>6+</sup> | - string<br>- \<length>\<length><br>- \<percentage> \<percentage> | auto | Display size of the mask image. The setting is valid only when **mask-image** is set to an image source.<br>The **string** values are as follows:<br>- **contain**: Expands the image to the maximum size so that its height and width are fully applicable to the content area.<br>- **cover**: Extends the image to a large enough size so that it completely covers the background area. Some parts of the image may not be displayed in the background area.<br>- **auto**: Retains the original aspect ratio of the image.<br>The two **<length>** values are as follows: The first value indicates the width, and the second value indicates the height. If you only set one value, the other value is set to **auto** by default.<br>The two **<percentage>** values indicate the image size in relative to the original image size. The first value indicates the width, and the second value indicates the height. If you only set one value, the other value is set to **auto** by default.|
| mask-position<sup>6+</sup> | - string string<br>- \<length> \<length><br>- \<percentage> \<percentage> | 0px 0px | Display position of the mask image. The setting is valid only when **mask-image** is set to an image source. Using keywords: If only one keyword is specified, the other value is **center** by default. The two values define the horizontal position and vertical position, respectively.<br>The **string** values are as follows:<br>- **left**: leftmost in the horizontal direction.<br>- **right**: rightmost in the horizontal direction.<br>- **top**: top in the vertical direction.<br>- **bottom**: bottom in the vertical direction.<br>- **center**: center position.<br>Using **\<length>**: The first value indicates the horizontal position, and the second value indicates the vertical position. For the upper left corner, the value is **0 0**. The unit is pixel. If only one value is specified, the other one is **50%**.<br>Using **\<percentage>**: The first value indicates the horizontal position, and the second value indicates the vertical position. **0% 0%** indicates the upper left corner. **100% 100%** indicates the lower right corner. If only one value is specified, the other one is **50%**.<br>Using both **\<percentage>** and **\<length>**.|
| border-image-source<sup>7+</sup> | string | - | Border image of the specified element.<br>Example:<br>border-image-source: url("/common/images/border.png") |
| border-image-slice<sup>7+</sup> | \<length> \| \<percentage> | 0 | Padding of the image.<br>The attribute can have one to four values:<br>If you set only one value, it specifies the padding for four sides.<br>If you set two values, the first value specifies the top and bottom padding, and the second value specifies the left and right padding.<br>If you set three values, the first value specifies the top padding, the second value specifies the left and right padding, and the third value specifies the bottom padding.<br>If you set four values, they respectively specify the padding for top, right, bottom, and left sides (in clockwise order).|
| border-image-width<sup>7+</sup> | \<length> \| \<percentage> | 0 | Width of the border image.<br>If you set only one value, it specifies the width for four sides.<br>If you set two values, the first value specifies the top and bottom width, and the second value specifies the left and right width.<br>If you set three values, the first value specifies the top width, the second value specifies the left and right width, and the third value specifies the bottom width.<br>If you set four values, they respectively specify the width for top, right, bottom, and left sides (in clockwise order).|
| border-image-outset<sup>7+</sup> | \<length> \| \<percentage> | 0 | How far the border image can extend beyond the border box.<br>If you set only one value, it specifies the distance of the boarder image beyond the border on four sides.<br>If you set two values, the first value specifies the distance of the boarder image's top and bottom sides beyond the boarder, and the second value specifies the distance of the boarder image's left and right sides beyond the boarder.<br>If you set three values, the first value specifies the distance of the boarder image's top side beyond the boarder, the second value specifies the distance of the boarder image's left and right sides beyond the boarder, and the third value specifies the distance of the boarder image's bottom side beyond the boarder.<br>If you set four values, they respectively specify the distance of the boarder image's top, right, bottom, and left sides beyond the boarder (in clockwise order).|
| border-image-repeat<sup>7+</sup> | string | stretch | How the border image fills the border box.<br>**stretch**: stretches the image to fill the border box.<br>**repeat**: tiles the image to fill the border box.<br>**round**: tiles the image to fill the border box. When the image cannot be tiled for an integer number of times, it can be scaled based on the site requirements.<br>|
| border-image<sup>7+</sup> | string | - | Shorthand attribute. The options are as follows:<br>- Attributes of the image border. The parameters include **border-image-source**, **border-image-slice**, **border-image-width**, **border-image-outset**, and **border-image-repeat**, respectively meaning the padding, width of the border image, how far the border image can extend beyond the border box, and how the border image fills the border box. The default values are used if the parameters are not set.<br>- Gradient color border.<br> Example:<br> border-image: linear-gradient(red, yellow) 10px |
| box-sizing<sup>9+</sup> | string | border-box | Border type of the component.<br>**content-box**: standard box. Its width and height contain only the width and height of the content, and does not include the border and padding.<br>**border-box**: The width and height include the content, border, and padding, that is, the actual width of the component content area = width - (border + padding).|
<a name="td0e7eac6a0284816a5c047f153c07d82"></a>
<table><thead align="left"><tr id="rccf63bae170347ec85cc93fb5c6c2dbb"><th class="cellrowborder" valign="top" width="27.04270427042704%" id="mcps1.1.5.1.1"><p id="a14a0c012a26248cfbec6b13dcc4f2cbe"><a name="a14a0c012a26248cfbec6b13dcc4f2cbe"></a><a name="a14a0c012a26248cfbec6b13dcc4f2cbe"></a>Name</p>
</th>
<th class="cellrowborder" valign="top" width="20.402040204020402%" id="mcps1.1.5.1.2"><p id="a8dc328a555a74157a00de86181fc3a7b"><a name="a8dc328a555a74157a00de86181fc3a7b"></a><a name="a8dc328a555a74157a00de86181fc3a7b"></a>Type</p>
</th>
<th class="cellrowborder" valign="top" width="11.601160116011602%" id="mcps1.1.5.1.3"><p id="a41a31e48d0c74ad4982add2655515c82"><a name="a41a31e48d0c74ad4982add2655515c82"></a><a name="a41a31e48d0c74ad4982add2655515c82"></a>Default Value</p>
</th>
<th class="cellrowborder" valign="top" width="40.954095409540955%" id="mcps1.1.5.1.4"><p id="af7a726e456f7485c87bd4e0527bc6584"><a name="af7a726e456f7485c87bd4e0527bc6584"></a><a name="af7a726e456f7485c87bd4e0527bc6584"></a>Description</p>
</th>
</tr>
</thead>
<tbody><tr id="r86e8f72ab5d34004853cb4c0d2f72c9d"><td class="cellrowborder" valign="top" width="27.04270427042704%" headers="mcps1.1.5.1.1 "><p id="a8bc81ecef4934adf91deb1d6167045d7"><a name="a8bc81ecef4934adf91deb1d6167045d7"></a><a name="a8bc81ecef4934adf91deb1d6167045d7"></a>width</p>
</td>
<td class="cellrowborder" valign="top" width="20.402040204020402%" headers="mcps1.1.5.1.2 "><p id="a59692217b9c94353a020a2f0a20f01a7"><a name="a59692217b9c94353a020a2f0a20f01a7"></a><a name="a59692217b9c94353a020a2f0a20f01a7"></a>&lt;length&gt; | &lt;percentage&gt;</p>
</td>
<td class="cellrowborder" valign="top" width="11.601160116011602%" headers="mcps1.1.5.1.3 "><p id="p3948114217528"><a name="p3948114217528"></a><a name="p3948114217528"></a>-</p>
</td>
<td class="cellrowborder" valign="top" width="40.954095409540955%" headers="mcps1.1.5.1.4 "><p id="p624653010258"><a name="p624653010258"></a><a name="p624653010258"></a>Component width.</p>
<p id="p84811050134010"><a name="p84811050134010"></a><a name="p84811050134010"></a>If this attribute is not set, the width required for the element content is used. </p>
</td>
</tr>
<tr id="r4f331adcbe404a8081155e9582e2e1ba"><td class="cellrowborder" valign="top" width="27.04270427042704%" headers="mcps1.1.5.1.1 "><p id="a738cc687552c4b8cb1aa9f9e7d9ea8c2"><a name="a738cc687552c4b8cb1aa9f9e7d9ea8c2"></a><a name="a738cc687552c4b8cb1aa9f9e7d9ea8c2"></a>height</p>
</td>
<td class="cellrowborder" valign="top" width="20.402040204020402%" headers="mcps1.1.5.1.2 "><p id="a82c5d9c65b3646ec92afe5f0f47a2149"><a name="a82c5d9c65b3646ec92afe5f0f47a2149"></a><a name="a82c5d9c65b3646ec92afe5f0f47a2149"></a>&lt;length&gt;<span id="ph11748352163918"><a name="ph11748352163918"></a><a name="ph11748352163918"></a></span> | &lt;percentage&gt;</p>
</td>
<td class="cellrowborder" valign="top" width="11.601160116011602%" headers="mcps1.1.5.1.3 "><p id="a7e6c7daafecf475888d0420835662eb4"><a name="a7e6c7daafecf475888d0420835662eb4"></a><a name="a7e6c7daafecf475888d0420835662eb4"></a>-</p>
</td>
<td class="cellrowborder" valign="top" width="40.954095409540955%" headers="mcps1.1.5.1.4 "><p id="p1477601264"><a name="p1477601264"></a><a name="p1477601264"></a>Component height.</p>
<p id="p208761554184020"><a name="p208761554184020"></a><a name="p208761554184020"></a>If this length attribute is not set, the length required for the element content is used. </p>
</td>
</tr>
<tr id="row13660102510327"><td class="cellrowborder" valign="top" width="27.04270427042704%" headers="mcps1.1.5.1.1 "><p id="p6377163523212"><a name="p6377163523212"></a><a name="p6377163523212"></a>min-width<sup id="sup537763519325"><a name="sup537763519325"></a><a name="sup537763519325"></a>5+</sup></p>
</td>
<td class="cellrowborder" valign="top" width="20.402040204020402%" headers="mcps1.1.5.1.2 "><p id="p1637715359321"><a name="p1637715359321"></a><a name="p1637715359321"></a>&lt;length&gt; | &lt;percentage&gt;<sup id="sup21401217019"><a name="sup21401217019"></a><a name="sup21401217019"></a>6+</sup></p>
</td>
<td class="cellrowborder" valign="top" width="11.601160116011602%" headers="mcps1.1.5.1.3 "><p id="p7377133512326"><a name="p7377133512326"></a><a name="p7377133512326"></a>0</p>
</td>
<td class="cellrowborder" valign="top" width="40.954095409540955%" headers="mcps1.1.5.1.4 "><p id="p183771735113211"><a name="p183771735113211"></a><a name="p183771735113211"></a>Minimum component width</p>
</td>
</tr>
<tr id="row1165519287327"><td class="cellrowborder" valign="top" width="27.04270427042704%" headers="mcps1.1.5.1.1 "><p id="p73779355328"><a name="p73779355328"></a><a name="p73779355328"></a>min-height<sup id="sup11377735113211"><a name="sup11377735113211"></a><a name="sup11377735113211"></a>5+</sup></p>
</td>
<td class="cellrowborder" valign="top" width="20.402040204020402%" headers="mcps1.1.5.1.2 "><p id="p3377335143216"><a name="p3377335143216"></a><a name="p3377335143216"></a>&lt;length&gt; | &lt;percentage&gt;<sup id="sup18164144009"><a name="sup18164144009"></a><a name="sup18164144009"></a>6+</sup></p>
</td>
<td class="cellrowborder" valign="top" width="11.601160116011602%" headers="mcps1.1.5.1.3 "><p id="p1737743533212"><a name="p1737743533212"></a><a name="p1737743533212"></a>0</p>
</td>
<td class="cellrowborder" valign="top" width="40.954095409540955%" headers="mcps1.1.5.1.4 "><p id="p337818353329"><a name="p337818353329"></a><a name="p337818353329"></a>Minimum component height</p>
</td>
</tr>
<tr id="row1202531163210"><td class="cellrowborder" valign="top" width="27.04270427042704%" headers="mcps1.1.5.1.1 "><p id="p10378183533219"><a name="p10378183533219"></a><a name="p10378183533219"></a>max-width<sup id="sup537813511327"><a name="sup537813511327"></a><a name="sup537813511327"></a>5+</sup></p>
</td>
<td class="cellrowborder" valign="top" width="20.402040204020402%" headers="mcps1.1.5.1.2 "><p id="p8251271007"><a name="p8251271007"></a><a name="p8251271007"></a>&lt;length&gt; | &lt;percentage&gt;<sup id="sup8251271603"><a name="sup8251271603"></a><a name="sup8251271603"></a>6+</sup></p>
</td>
<td class="cellrowborder" valign="top" width="11.601160116011602%" headers="mcps1.1.5.1.3 "><p id="p737817355325"><a name="p737817355325"></a><a name="p737817355325"></a>-</p>
</td>
<td class="cellrowborder" valign="top" width="40.954095409540955%" headers="mcps1.1.5.1.4 "><p id="p19378203513216"><a name="p19378203513216"></a><a name="p19378203513216"></a>Maximum component width, which has no restriction by default</p>
</td>
</tr>
<tr id="row3921633163215"><td class="cellrowborder" valign="top" width="27.04270427042704%" headers="mcps1.1.5.1.1 "><p id="p8378135193215"><a name="p8378135193215"></a><a name="p8378135193215"></a>max-height<sup id="sup63781535163210"><a name="sup63781535163210"></a><a name="sup63781535163210"></a>5+</sup></p>
</td>
<td class="cellrowborder" valign="top" width="20.402040204020402%" headers="mcps1.1.5.1.2 "><p id="p173788353327"><a name="p173788353327"></a><a name="p173788353327"></a>&lt;length&gt; | &lt;percentage&gt;<sup id="sup370891800"><a name="sup370891800"></a><a name="sup370891800"></a>6+</sup></p>
</td>
<td class="cellrowborder" valign="top" width="11.601160116011602%" headers="mcps1.1.5.1.3 "><p id="p11378193523214"><a name="p11378193523214"></a><a name="p11378193523214"></a>-</p>
</td>
<td class="cellrowborder" valign="top" width="40.954095409540955%" headers="mcps1.1.5.1.4 "><p id="p23781235203214"><a name="p23781235203214"></a><a name="p23781235203214"></a>Maximum component height, which has no restriction by default</p>
</td>
</tr>
<tr id="rbc132bca84214d4295bfeb9530425f5c"><td class="cellrowborder" valign="top" width="27.04270427042704%" headers="mcps1.1.5.1.1 "><p id="a8ff18465b8f0453c836067e5902b7eb6"><a name="a8ff18465b8f0453c836067e5902b7eb6"></a><a name="a8ff18465b8f0453c836067e5902b7eb6"></a>padding</p>
</td>
<td class="cellrowborder" valign="top" width="20.402040204020402%" headers="mcps1.1.5.1.2 "><p id="a53628f36a25a4823a901d5b66860f44e"><a name="a53628f36a25a4823a901d5b66860f44e"></a><a name="a53628f36a25a4823a901d5b66860f44e"></a>&lt;length&gt; | &lt;percentage&gt;<sup id="sup1886516813013"><a name="sup1886516813013"></a><a name="sup1886516813013"></a>5+</sup></p>
</td>
<td class="cellrowborder" valign="top" width="11.601160116011602%" headers="mcps1.1.5.1.3 "><p id="adc824deaee924821a47a798b589f22c8"><a name="adc824deaee924821a47a798b589f22c8"></a><a name="adc824deaee924821a47a798b589f22c8"></a>0</p>
</td>
<td class="cellrowborder" valign="top" width="40.954095409540955%" headers="mcps1.1.5.1.4 "><p id="p157435053316"><a name="p157435053316"></a><a name="p157435053316"></a>Shorthand attribute to set all padding attributes.</p>
<div class="p" id="a68a6d5ddc59c49f0aaddd82e75932524"><a name="a68a6d5ddc59c49f0aaddd82e75932524"></a><a name="a68a6d5ddc59c49f0aaddd82e75932524"></a>The attribute can have one to four values:<a name="ul15202134923211"></a><a name="ul15202134923211"></a><ul id="ul15202134923211"><li><p id="p10614155353215"><a name="p10614155353215"></a><a name="p10614155353215"></a>If you set only one value, it specifies the padding for four sides.</p>
</li><li><p id="p10614175393216"><a name="p10614175393216"></a><a name="p10614175393216"></a>If you set two values, the first value specifies the top and bottom padding, and the second value specifies the left and right padding.</p>
</li><li><p id="p8614205393214"><a name="p8614205393214"></a><a name="p8614205393214"></a>If you set three values, the first value specifies the top padding, the second value specifies the left and right padding, and the third value specifies the bottom padding.</p>
</li><li><p id="p106141853193215"><a name="p106141853193215"></a><a name="p106141853193215"></a>If you set four values, they respectively specify the padding for top, right, bottom, and left sides (in clockwise order).</p>
</li></ul>
</div>
</td>
</tr>
<tr id="r5b9c603c3e9b4695b8908eb599f7146b"><td class="cellrowborder" valign="top" width="27.04270427042704%" headers="mcps1.1.5.1.1 "><p id="ab0185a7b5a4944f3b38f8c71c8ca794d"><a name="ab0185a7b5a4944f3b38f8c71c8ca794d"></a><a name="ab0185a7b5a4944f3b38f8c71c8ca794d"></a>padding-[left|top|right|bottom]</p>
</td>
<td class="cellrowborder" valign="top" width="20.402040204020402%" headers="mcps1.1.5.1.2 "><p id="a49dd523e2f1b4253a19231e776dc1951"><a name="a49dd523e2f1b4253a19231e776dc1951"></a><a name="a49dd523e2f1b4253a19231e776dc1951"></a>&lt;length&gt; | &lt;percentage&gt;<sup id="sup19949912807"><a name="sup19949912807"></a><a name="sup19949912807"></a>5+</sup></p>
</td>
<td class="cellrowborder" valign="top" width="11.601160116011602%" headers="mcps1.1.5.1.3 "><p id="af52ecd93919b4fa08ae4d376e3d544a2"><a name="af52ecd93919b4fa08ae4d376e3d544a2"></a><a name="af52ecd93919b4fa08ae4d376e3d544a2"></a>0</p>
</td>
<td class="cellrowborder" valign="top" width="40.954095409540955%" headers="mcps1.1.5.1.4 "><p id="a3575ab240d384ab1a21119ea3428ab7d"><a name="a3575ab240d384ab1a21119ea3428ab7d"></a><a name="a3575ab240d384ab1a21119ea3428ab7d"></a>Left, top, right, and bottom padding (in px).</p>
</td>
</tr>
<tr id="row116908472362"><td class="cellrowborder" valign="top" width="27.04270427042704%" headers="mcps1.1.5.1.1 "><p id="p769124717365"><a name="p769124717365"></a><a name="p769124717365"></a>padding-[start|end]</p>
</td>
<td class="cellrowborder" valign="top" width="20.402040204020402%" headers="mcps1.1.5.1.2 "><p id="p157617124374"><a name="p157617124374"></a><a name="p157617124374"></a>&lt;length&gt; | &lt;percentage&gt;<sup id="sup8490161513019"><a name="sup8490161513019"></a><a name="sup8490161513019"></a>5+</sup></p>
</td>
<td class="cellrowborder" valign="top" width="11.601160116011602%" headers="mcps1.1.5.1.3 "><p id="p1069144703616"><a name="p1069144703616"></a><a name="p1069144703616"></a>0</p>
</td>
<td class="cellrowborder" valign="top" width="40.954095409540955%" headers="mcps1.1.5.1.4 "><p id="p1269184753610"><a name="p1269184753610"></a><a name="p1269184753610"></a>Start and end padding.</p>
</td>
</tr>
<tr id="ra1f0ab04099e40da96fcea74a214d6dc"><td class="cellrowborder" valign="top" width="27.04270427042704%" headers="mcps1.1.5.1.1 "><p id="afa508e5429d948b2b561943d6b2f0f31"><a name="afa508e5429d948b2b561943d6b2f0f31"></a><a name="afa508e5429d948b2b561943d6b2f0f31"></a>margin</p>
</td>
<td class="cellrowborder" valign="top" width="20.402040204020402%" headers="mcps1.1.5.1.2 "><p id="a4dab4f9d97a74a27a45b7ef1d2ab08e6"><a name="a4dab4f9d97a74a27a45b7ef1d2ab08e6"></a><a name="a4dab4f9d97a74a27a45b7ef1d2ab08e6"></a>&lt;length&gt; | &lt;percentage&gt;<sup id="sup1433352175220"><a name="sup1433352175220"></a><a name="sup1433352175220"></a>5+</sup></p>
</td>
<td class="cellrowborder" valign="top" width="11.601160116011602%" headers="mcps1.1.5.1.3 "><p id="a5e3c234d78214e8180b51d237adda154"><a name="a5e3c234d78214e8180b51d237adda154"></a><a name="a5e3c234d78214e8180b51d237adda154"></a>0</p>
</td>
<td class="cellrowborder" valign="top" width="40.954095409540955%" headers="mcps1.1.5.1.4 "><p id="a1d350e36a773420baf5ebb930cd5ad66"><a name="a1d350e36a773420baf5ebb930cd5ad66"></a><a name="a1d350e36a773420baf5ebb930cd5ad66"></a>Shorthand attribute to set margins for all sides in a declaration. The attribute can have one to four values:</p>
<a name="ul5333133311105"></a><a name="ul5333133311105"></a><ul id="ul5333133311105"><li><p id="p03345339103"><a name="p03345339103"></a><a name="p03345339103"></a>If you set only one value, it specifies the margin for all the four sides.</p>
</li><li><p id="p1133420334108"><a name="p1133420334108"></a><a name="p1133420334108"></a>If you set two values, the first value is for the top and bottom sides and the second value for the left and right sides.</p>
</li><li><p id="p193341533191015"><a name="p193341533191015"></a><a name="p193341533191015"></a>If you set three values, the first value is for the top, the second value for the left and right, and the third value for the bottom.</p>
</li><li><p id="p733412334102"><a name="p733412334102"></a><a name="p733412334102"></a>If you set four values, they are margins for top, right, bottom, and left sides, respectively.</p>
</li></ul>
</td>
</tr>
<tr id="rbcdeb5f7b53646bcbeb0d9ce45842f34"><td class="cellrowborder" valign="top" width="27.04270427042704%" headers="mcps1.1.5.1.1 "><p id="a70939a36b2b04dd8bec21f5bddc8637e"><a name="a70939a36b2b04dd8bec21f5bddc8637e"></a><a name="a70939a36b2b04dd8bec21f5bddc8637e"></a>margin-[left|top|right|bottom]</p>
</td>
<td class="cellrowborder" valign="top" width="20.402040204020402%" headers="mcps1.1.5.1.2 "><p id="ae53ac9ac370d483990e04ea9789c1e49"><a name="ae53ac9ac370d483990e04ea9789c1e49"></a><a name="ae53ac9ac370d483990e04ea9789c1e49"></a>&lt;length&gt; | &lt;percentage&gt;<sup id="sup378331720532"><a name="sup378331720532"></a><a name="sup378331720532"></a>5+</sup></p>
</td>
<td class="cellrowborder" valign="top" width="11.601160116011602%" headers="mcps1.1.5.1.3 "><p id="a180cd037e6174e5c82f35a3a66b6f2ec"><a name="a180cd037e6174e5c82f35a3a66b6f2ec"></a><a name="a180cd037e6174e5c82f35a3a66b6f2ec"></a>0</p>
</td>
<td class="cellrowborder" valign="top" width="40.954095409540955%" headers="mcps1.1.5.1.4 "><p id="a487d09add6e54c5c89fa4f22e9318271"><a name="a487d09add6e54c5c89fa4f22e9318271"></a><a name="a487d09add6e54c5c89fa4f22e9318271"></a>Left, top, right, and bottom margins.</p>
</td>
</tr>
<tr id="row2347125383714"><td class="cellrowborder" valign="top" width="27.04270427042704%" headers="mcps1.1.5.1.1 "><p id="p9492107123816"><a name="p9492107123816"></a><a name="p9492107123816"></a>margin-[start|end]</p>
</td>
<td class="cellrowborder" valign="top" width="20.402040204020402%" headers="mcps1.1.5.1.2 "><p id="p164928753815"><a name="p164928753815"></a><a name="p164928753815"></a>&lt;length&gt; | &lt;percentage&gt;<sup id="sup164498399219"><a name="sup164498399219"></a><a name="sup164498399219"></a>5+</sup></p>
</td>
<td class="cellrowborder" valign="top" width="11.601160116011602%" headers="mcps1.1.5.1.3 "><p id="p1549213793811"><a name="p1549213793811"></a><a name="p1549213793811"></a>0</p>
</td>
<td class="cellrowborder" valign="top" width="40.954095409540955%" headers="mcps1.1.5.1.4 "><p id="p1049212715388"><a name="p1049212715388"></a><a name="p1049212715388"></a>Start and end margins.</p>
</td>
</tr>
<tr id="r60ccba1f3cc54a4399490c92f2fd350d"><td class="cellrowborder" valign="top" width="27.04270427042704%" headers="mcps1.1.5.1.1 "><p id="a222bb48f24014f2eb2b16a1a840bbebb"><a name="a222bb48f24014f2eb2b16a1a840bbebb"></a><a name="a222bb48f24014f2eb2b16a1a840bbebb"></a>border</p>
</td>
<td class="cellrowborder" valign="top" width="20.402040204020402%" headers="mcps1.1.5.1.2 "><p id="a79b4eaf9983c44d0aad39ff04d0997a8"><a name="a79b4eaf9983c44d0aad39ff04d0997a8"></a><a name="a79b4eaf9983c44d0aad39ff04d0997a8"></a>-</p>
</td>
<td class="cellrowborder" valign="top" width="11.601160116011602%" headers="mcps1.1.5.1.3 "><p id="aac320f4f0a42401aa7fa778d9829d77c"><a name="aac320f4f0a42401aa7fa778d9829d77c"></a><a name="aac320f4f0a42401aa7fa778d9829d77c"></a>0</p>
</td>
<td class="cellrowborder" valign="top" width="40.954095409540955%" headers="mcps1.1.5.1.4 "><p id="a9cd962871a4c467a8e1ef452621d5cd7"><a name="a9cd962871a4c467a8e1ef452621d5cd7"></a><a name="a9cd962871a4c467a8e1ef452621d5cd7"></a>Shorthand attribute to set all borders. You can set <strong id="b79128342503"><a name="b79128342503"></a><a name="b79128342503"></a>border-width</strong>, <strong id="b9366173919505"><a name="b9366173919505"></a><a name="b9366173919505"></a>border-style</strong>, and <strong id="b184351248205019"><a name="b184351248205019"></a><a name="b184351248205019"></a>border-color</strong> in sequence. Default values are used for attributes that are not set.</p>
</td>
</tr>
<tr id="rf47e6860036e4ababdf04b51974c019c"><td class="cellrowborder" valign="top" width="27.04270427042704%" headers="mcps1.1.5.1.1 "><p id="a987708c0864a4128af094334f1b024b3"><a name="a987708c0864a4128af094334f1b024b3"></a><a name="a987708c0864a4128af094334f1b024b3"></a>border-style</p>
</td>
<td class="cellrowborder" valign="top" width="20.402040204020402%" headers="mcps1.1.5.1.2 "><p id="p513631613319"><a name="p513631613319"></a><a name="p513631613319"></a>string</p>
</td>
<td class="cellrowborder" valign="top" width="11.601160116011602%" headers="mcps1.1.5.1.3 "><p id="a2567083af59c40e58e3e4d9b0ddf1485"><a name="a2567083af59c40e58e3e4d9b0ddf1485"></a><a name="a2567083af59c40e58e3e4d9b0ddf1485"></a>solid</p>
</td>
<td class="cellrowborder" valign="top" width="40.954095409540955%" headers="mcps1.1.5.1.4 "><p id="p342285712314"><a name="p342285712314"></a><a name="p342285712314"></a>Shorthand attribute to set the style for all borders. Available values are as follows:</p>
<a name="ul1470834505612"></a><a name="ul1470834505612"></a><ul id="ul1470834505612"><li><strong id="b143453286360"><a name="b143453286360"></a><a name="b143453286360"></a>dotted</strong>: dotted border. The radius of a dot is half of border-width.</li><li><strong id="b792117280367"><a name="b792117280367"></a><a name="b792117280367"></a>dashed</strong>: dashed border.</li></ul>
<a name="ul15621125545612"></a><a name="ul15621125545612"></a><ul id="ul15621125545612"><li><strong id="b1335862963610"><a name="b1335862963610"></a><a name="b1335862963610"></a>solid</strong>: solid border.</li></ul>
</td>
</tr>
<tr id="row4953937976"><td class="cellrowborder" valign="top" width="27.04270427042704%" headers="mcps1.1.5.1.1 "><p id="p119531437370"><a name="p119531437370"></a><a name="p119531437370"></a>border-[left|top|right|bottom]-style</p>
</td>
<td class="cellrowborder" valign="top" width="20.402040204020402%" headers="mcps1.1.5.1.2 "><p id="p129532037175"><a name="p129532037175"></a><a name="p129532037175"></a>string</p>
</td>
<td class="cellrowborder" valign="top" width="11.601160116011602%" headers="mcps1.1.5.1.3 "><p id="p495312372717"><a name="p495312372717"></a><a name="p495312372717"></a>solid</p>
</td>
<td class="cellrowborder" valign="top" width="40.954095409540955%" headers="mcps1.1.5.1.4 "><p id="p595353718719"><a name="p595353718719"></a><a name="p595353718719"></a>Styles of the left, top, right, and bottom borders. The available values are <strong id="b17769171311540"><a name="b17769171311540"></a><a name="b17769171311540"></a>dotted</strong>, <strong id="b237141519547"><a name="b237141519547"></a><a name="b237141519547"></a>dashed</strong>, and <strong id="b8949161613540"><a name="b8949161613540"></a><a name="b8949161613540"></a>solid</strong>.</p>
</td>
</tr>
<tr id="r6d2787d3df7c4c88ab88ab99a87459d3"><td class="cellrowborder" valign="top" width="27.04270427042704%" headers="mcps1.1.5.1.1 "><p id="a8afd82b1aba547d3b0188b749518b2de"><a name="a8afd82b1aba547d3b0188b749518b2de"></a><a name="a8afd82b1aba547d3b0188b749518b2de"></a>border-[left|top|right|bottom]</p>
</td>
<td class="cellrowborder" valign="top" width="20.402040204020402%" headers="mcps1.1.5.1.2 "><p id="ac4b8a3b39e5446b5868f1f2989dc9590"><a name="ac4b8a3b39e5446b5868f1f2989dc9590"></a><a name="ac4b8a3b39e5446b5868f1f2989dc9590"></a>-</p>
</td>
<td class="cellrowborder" valign="top" width="11.601160116011602%" headers="mcps1.1.5.1.3 "><p id="a3420bc82bd17458ab82fa996ade7064c"><a name="a3420bc82bd17458ab82fa996ade7064c"></a><a name="a3420bc82bd17458ab82fa996ade7064c"></a>-</p>
</td>
<td class="cellrowborder" valign="top" width="40.954095409540955%" headers="mcps1.1.5.1.4 "><p id="af4178a066c344412afbd38f4b0c44818"><a name="af4178a066c344412afbd38f4b0c44818"></a><a name="af4178a066c344412afbd38f4b0c44818"></a>Shorthand attribute to set the borders for every side respectively. You can set <strong id="b122415514554"><a name="b122415514554"></a><a name="b122415514554"></a>border-width</strong>, <strong id="b12296178135513"><a name="b12296178135513"></a><a name="b12296178135513"></a>border-style</strong>, and <strong id="b1129701210553"><a name="b1129701210553"></a><a name="b1129701210553"></a>border-color</strong> in sequence. Default values are used for attributes that are not set.</p>
</td>
</tr>
<tr id="ra8d2cc3cfa024bb3a5c167e3a84d974e"><td class="cellrowborder" valign="top" width="27.04270427042704%" headers="mcps1.1.5.1.1 "><p id="adf0e0afedc774afca9cda0e509391029"><a name="adf0e0afedc774afca9cda0e509391029"></a><a name="adf0e0afedc774afca9cda0e509391029"></a>border-width</p>
</td>
<td class="cellrowborder" valign="top" width="20.402040204020402%" headers="mcps1.1.5.1.2 "><p id="a0782ea2c45eb4864a8df82f30dd2cd5f"><a name="a0782ea2c45eb4864a8df82f30dd2cd5f"></a><a name="a0782ea2c45eb4864a8df82f30dd2cd5f"></a>&lt;length&gt;</p>
</td>
<td class="cellrowborder" valign="top" width="11.601160116011602%" headers="mcps1.1.5.1.3 "><p id="a395cbedd521145bd820b9171ee2dd7ac"><a name="a395cbedd521145bd820b9171ee2dd7ac"></a><a name="a395cbedd521145bd820b9171ee2dd7ac"></a>0</p>
</td>
<td class="cellrowborder" valign="top" width="40.954095409540955%" headers="mcps1.1.5.1.4 "><p id="a7ae60621ea3341818a03bfdffa641894"><a name="a7ae60621ea3341818a03bfdffa641894"></a><a name="a7ae60621ea3341818a03bfdffa641894"></a>Shorthand attribute to set the width of all borders<span id="ph07997369365"><a name="ph07997369365"></a><a name="ph07997369365"></a>, or separately set the width of each border</span>.</p>
</td>
</tr>
<tr id="r97f2117589624b018d91ca8a099f3264"><td class="cellrowborder" valign="top" width="27.04270427042704%" headers="mcps1.1.5.1.1 "><p id="a7371edc07c664266a2e1866f31ad0d0c"><a name="a7371edc07c664266a2e1866f31ad0d0c"></a><a name="a7371edc07c664266a2e1866f31ad0d0c"></a>border-[left|top|right|bottom]-width</p>
</td>
<td class="cellrowborder" valign="top" width="20.402040204020402%" headers="mcps1.1.5.1.2 "><p id="a2faa532b841948a7b6598542b4eccc7b"><a name="a2faa532b841948a7b6598542b4eccc7b"></a><a name="a2faa532b841948a7b6598542b4eccc7b"></a>&lt;length&gt;</p>
</td>
<td class="cellrowborder" valign="top" width="11.601160116011602%" headers="mcps1.1.5.1.3 "><p id="a87f38cfa47f54bc18c32f9671c0f9ca6"><a name="a87f38cfa47f54bc18c32f9671c0f9ca6"></a><a name="a87f38cfa47f54bc18c32f9671c0f9ca6"></a>0</p>
</td>
<td class="cellrowborder" valign="top" width="40.954095409540955%" headers="mcps1.1.5.1.4 "><p id="a20386e66c3834d5f96cf9435c4715c5b"><a name="a20386e66c3834d5f96cf9435c4715c5b"></a><a name="a20386e66c3834d5f96cf9435c4715c5b"></a>Attribute to set widths of left, top, right, and bottom borders.</p>
</td>
</tr>
<tr id="rebb331f7734b46b98d7d630beb4bfc40"><td class="cellrowborder" valign="top" width="27.04270427042704%" headers="mcps1.1.5.1.1 "><p id="a40a816cf0a03489d81f209a8aa7d81a6"><a name="a40a816cf0a03489d81f209a8aa7d81a6"></a><a name="a40a816cf0a03489d81f209a8aa7d81a6"></a>border-color</p>
</td>
<td class="cellrowborder" valign="top" width="20.402040204020402%" headers="mcps1.1.5.1.2 "><p id="afcc7c948ae0947b2a78002d31f2f9748"><a name="afcc7c948ae0947b2a78002d31f2f9748"></a><a name="afcc7c948ae0947b2a78002d31f2f9748"></a>&lt;color&gt;</p>
</td>
<td class="cellrowborder" valign="top" width="11.601160116011602%" headers="mcps1.1.5.1.3 "><p id="ae0909d2b896342f9b2196fe0dce72920"><a name="ae0909d2b896342f9b2196fe0dce72920"></a><a name="ae0909d2b896342f9b2196fe0dce72920"></a>black</p>
</td>
<td class="cellrowborder" valign="top" width="40.954095409540955%" headers="mcps1.1.5.1.4 "><p id="a76fd98995e1d4217aa703fecd69325c7"><a name="a76fd98995e1d4217aa703fecd69325c7"></a><a name="a76fd98995e1d4217aa703fecd69325c7"></a>Shorthand attribute to set the color of all borders<span id="ph9587639113619"><a name="ph9587639113619"></a><a name="ph9587639113619"></a>, or separately set the color of each border</span>.</p>
</td>
</tr>
<tr id="r92bbe455dcbe40c9aeeb71145a46dee7"><td class="cellrowborder" valign="top" width="27.04270427042704%" headers="mcps1.1.5.1.1 "><p id="a2afc646d6a2549548bcd5c4b9bed1fb5"><a name="a2afc646d6a2549548bcd5c4b9bed1fb5"></a><a name="a2afc646d6a2549548bcd5c4b9bed1fb5"></a>border-[left|top|right|bottom]-color</p>
</td>
<td class="cellrowborder" valign="top" width="20.402040204020402%" headers="mcps1.1.5.1.2 "><p id="a34556866a4f54f5da88f148fc698867b"><a name="a34556866a4f54f5da88f148fc698867b"></a><a name="a34556866a4f54f5da88f148fc698867b"></a>&lt;color&gt;</p>
</td>
<td class="cellrowborder" valign="top" width="11.601160116011602%" headers="mcps1.1.5.1.3 "><p id="a8ff58e18553846a38e82c69149e2aa30"><a name="a8ff58e18553846a38e82c69149e2aa30"></a><a name="a8ff58e18553846a38e82c69149e2aa30"></a>black</p>
</td>
<td class="cellrowborder" valign="top" width="40.954095409540955%" headers="mcps1.1.5.1.4 "><p id="a5c85947d388c4c7fbf0de07b022bb44e"><a name="a5c85947d388c4c7fbf0de07b022bb44e"></a><a name="a5c85947d388c4c7fbf0de07b022bb44e"></a>Attribute to set colors of left, top, right, and bottom borders.</p>
</td>
</tr>
<tr id="r466497bc9bfd48f9a3e718beb413ac0c"><td class="cellrowborder" valign="top" width="27.04270427042704%" headers="mcps1.1.5.1.1 "><p id="a65974e3078c447a383fb9237cc4ffa32"><a name="a65974e3078c447a383fb9237cc4ffa32"></a><a name="a65974e3078c447a383fb9237cc4ffa32"></a>border-radius</p>
</td>
<td class="cellrowborder" valign="top" width="20.402040204020402%" headers="mcps1.1.5.1.2 "><p id="a413fd0aea8b243349a19f825e96ee8b6"><a name="a413fd0aea8b243349a19f825e96ee8b6"></a><a name="a413fd0aea8b243349a19f825e96ee8b6"></a>&lt;length&gt;</p>
</td>
<td class="cellrowborder" valign="top" width="11.601160116011602%" headers="mcps1.1.5.1.3 "><p id="af786857698c74e259f52589a6670a0a1"><a name="af786857698c74e259f52589a6670a0a1"></a><a name="af786857698c74e259f52589a6670a0a1"></a>-</p>
</td>
<td class="cellrowborder" valign="top" width="40.954095409540955%" headers="mcps1.1.5.1.4 "><p id="a52ca834f42124d3b8b12bbf54914fc96"><a name="a52ca834f42124d3b8b12bbf54914fc96"></a><a name="a52ca834f42124d3b8b12bbf54914fc96"></a>Attribute to set the radius of round borders of an element. <span id="ph1249443123611"><a name="ph1249443123611"></a><a name="ph1249443123611"></a>This attribute cannot be used to set the width, color, or style of a specific border. To set the width or color, you need to set <strong id="b124211434362"><a name="b124211434362"></a><a name="b124211434362"></a>border-width</strong>, <strong id="b124894383615"><a name="b124894383615"></a><a name="b124894383615"></a>border-color</strong>, or <strong id="b7166134516465"><a name="b7166134516465"></a><a name="b7166134516465"></a>border-style</strong> for all the borders at the same time.</span></p>
<div class="note" id="note037175915196"><a name="note037175915196"></a><a name="note037175915196"></a><span class="notetitle"> NOTE: </span><div class="notebody"><p id="p123711759171916"><a name="p123711759171916"></a><a name="p123711759171916"></a>In the four-value syntax, the values apply to lower-left corner, lower-right corner, upper-left corner, and upper-right corner, respectively.</p>
</div></div>
</td>
</tr>
<tr id="rd4fc211b573447a1a1b7841a144eccae"><td class="cellrowborder" valign="top" width="27.04270427042704%" headers="mcps1.1.5.1.1 "><p id="a466f1f8bc2fb404e82e8417c5133eacb"><a name="a466f1f8bc2fb404e82e8417c5133eacb"></a><a name="a466f1f8bc2fb404e82e8417c5133eacb"></a>border-[top|bottom]-[left|right]-radius</p>
</td>
<td class="cellrowborder" valign="top" width="20.402040204020402%" headers="mcps1.1.5.1.2 "><p id="a499fe910d0284647abc48b1bd0eb4868"><a name="a499fe910d0284647abc48b1bd0eb4868"></a><a name="a499fe910d0284647abc48b1bd0eb4868"></a>&lt;length&gt;</p>
</td>
<td class="cellrowborder" valign="top" width="11.601160116011602%" headers="mcps1.1.5.1.3 "><p id="ac142d1054eee499f948069f46129c492"><a name="ac142d1054eee499f948069f46129c492"></a><a name="ac142d1054eee499f948069f46129c492"></a>-</p>
</td>
<td class="cellrowborder" valign="top" width="40.954095409540955%" headers="mcps1.1.5.1.4 "><p id="a63757091a86c4ced97f0c39d37a2117c"><a name="a63757091a86c4ced97f0c39d37a2117c"></a><a name="a63757091a86c4ced97f0c39d37a2117c"></a>Attribute to respectively set the radii of upper-left, upper-right, lower-right, and lower-left rounded corners</p>
</td>
</tr>
<tr id="re84d5481999b4984ac1242cc5cdf20ca"><td class="cellrowborder" valign="top" width="27.04270427042704%" headers="mcps1.1.5.1.1 "><p id="ae335be2c6150440fb31b40b1ca117858"><a name="ae335be2c6150440fb31b40b1ca117858"></a><a name="ae335be2c6150440fb31b40b1ca117858"></a>background</p>
</td>
<td class="cellrowborder" valign="top" width="20.402040204020402%" headers="mcps1.1.5.1.2 "><p id="a394a81171c5c4d1aa81b94fc5d2f0f07"><a name="a394a81171c5c4d1aa81b94fc5d2f0f07"></a><a name="a394a81171c5c4d1aa81b94fc5d2f0f07"></a>&lt;linear-gradient&gt;</p>
</td>
<td class="cellrowborder" valign="top" width="11.601160116011602%" headers="mcps1.1.5.1.3 "><p id="a0734de04e90e470cb608e8d5f42c6874"><a name="a0734de04e90e470cb608e8d5f42c6874"></a><a name="a0734de04e90e470cb608e8d5f42c6874"></a>-</p>
</td>
<td class="cellrowborder" valign="top" width="40.954095409540955%" headers="mcps1.1.5.1.4 "><p id="a1d2985ee819d4cfd87861080354def51"><a name="a1d2985ee819d4cfd87861080354def51"></a><a name="a1d2985ee819d4cfd87861080354def51"></a>This attribute supports <a href="js-components-common-gradient.md">Gradient Styles</a> only but is not compatible with <strong id="b389373419292"><a name="b389373419292"></a><a name="b389373419292"></a>background-color</strong> or <strong id="b0399637142918"><a name="b0399637142918"></a><a name="b0399637142918"></a>background-image</strong>.</p>
</td>
</tr>
<tr id="r81e36151ade9499aa21d3c0b72da1111"><td class="cellrowborder" valign="top" width="27.04270427042704%" headers="mcps1.1.5.1.1 "><p id="a2977672444224b738a566c61225961c2"><a name="a2977672444224b738a566c61225961c2"></a><a name="a2977672444224b738a566c61225961c2"></a>background-color</p>
</td>
<td class="cellrowborder" valign="top" width="20.402040204020402%" headers="mcps1.1.5.1.2 "><p id="a87186748ed7c4694aef0095d8a7f8e43"><a name="a87186748ed7c4694aef0095d8a7f8e43"></a><a name="a87186748ed7c4694aef0095d8a7f8e43"></a>&lt;color&gt;</p>
</td>
<td class="cellrowborder" valign="top" width="11.601160116011602%" headers="mcps1.1.5.1.3 "><p id="a2775a3cca8994bec9b754af0d2455eb5"><a name="a2775a3cca8994bec9b754af0d2455eb5"></a><a name="a2775a3cca8994bec9b754af0d2455eb5"></a>-</p>
</td>
<td class="cellrowborder" valign="top" width="40.954095409540955%" headers="mcps1.1.5.1.4 "><p id="a372b6089bf9746f091c91fa49b571f1d"><a name="a372b6089bf9746f091c91fa49b571f1d"></a><a name="a372b6089bf9746f091c91fa49b571f1d"></a>Background color.</p>
</td>
</tr>
<tr id="r80de1dc3e37848b38f65fd4ef7711bfa"><td class="cellrowborder" valign="top" width="27.04270427042704%" headers="mcps1.1.5.1.1 "><p id="ab2dff80cd59c4db1bf4293172f89735e"><a name="ab2dff80cd59c4db1bf4293172f89735e"></a><a name="ab2dff80cd59c4db1bf4293172f89735e"></a>background-image</p>
</td>
<td class="cellrowborder" valign="top" width="20.402040204020402%" headers="mcps1.1.5.1.2 "><p id="ad9a7e9f2469b45238a6a0ac6da232286"><a name="ad9a7e9f2469b45238a6a0ac6da232286"></a><a name="ad9a7e9f2469b45238a6a0ac6da232286"></a>string</p>
</td>
<td class="cellrowborder" valign="top" width="11.601160116011602%" headers="mcps1.1.5.1.3 "><p id="a73fb72c96edd488ba74c364568e345c6"><a name="a73fb72c96edd488ba74c364568e345c6"></a><a name="a73fb72c96edd488ba74c364568e345c6"></a>-</p>
</td>
<td class="cellrowborder" valign="top" width="40.954095409540955%" headers="mcps1.1.5.1.4 "><p id="a24de29e3cb4d476fabe55d48d69350a8"><a name="a24de29e3cb4d476fabe55d48d69350a8"></a><a name="a24de29e3cb4d476fabe55d48d69350a8"></a>Background image. Currently, this attribute is not compatible with <strong id="b17699154763620"><a name="b17699154763620"></a><a name="b17699154763620"></a>background-color</strong> or <strong id="b87001647163613"><a name="b87001647163613"></a><a name="b87001647163613"></a>background</strong>. Local image resources are supported.</p>
<p id="p434668142510"><a name="p434668142510"></a><a name="p434668142510"></a>Example:</p>
<a name="ul11766913172513"></a><a name="ul11766913172513"></a><ul id="ul11766913172513"><li>background-image: url("/common/background.png")<div class="note" id="note959971405014"><a name="note959971405014"></a><a name="note959971405014"></a><span class="notetitle"> NOTE: </span><div class="notebody"><p id="p16599191445013"><a name="p16599191445013"></a><a name="p16599191445013"></a>The SVG format is not supported.</p>
</div></div>
</li></ul>
</td>
</tr>
<tr id="re1870d7c91f148e8ad7264a95eb2c580"><td class="cellrowborder" valign="top" width="27.04270427042704%" headers="mcps1.1.5.1.1 "><p id="af81424fd1fbf4f5da65ea5d136390494"><a name="af81424fd1fbf4f5da65ea5d136390494"></a><a name="af81424fd1fbf4f5da65ea5d136390494"></a>background-size</p>
</td>
<td class="cellrowborder" valign="top" width="20.402040204020402%" headers="mcps1.1.5.1.2 "><a name="ul1065173641310"></a><a name="ul1065173641310"></a><ul id="ul1065173641310"><li>string</li><li>&lt;length&gt; &lt;length&gt;</li><li>&lt;percentage&gt; &lt;percentage&gt;</li></ul>
</td>
<td class="cellrowborder" valign="top" width="11.601160116011602%" headers="mcps1.1.5.1.3 "><p id="a222f4e09239a4ab08880d1d9544d337c"><a name="a222f4e09239a4ab08880d1d9544d337c"></a><a name="a222f4e09239a4ab08880d1d9544d337c"></a>auto</p>
</td>
<td class="cellrowborder" valign="top" width="40.954095409540955%" headers="mcps1.1.5.1.4 "><p id="p91971112114318"><a name="p91971112114318"></a><a name="p91971112114318"></a>Background image size.</p>
<a name="ul41331853154111"></a><a name="ul41331853154111"></a><ul id="ul41331853154111"><li>The <strong id="b1229715499365"><a name="b1229715499365"></a><a name="b1229715499365"></a>string</strong> values are as follows:<a name="ul13611494111"></a><a name="ul13611494111"></a><ul id="ul13611494111"><li><strong id="b4759749163610"><a name="b4759749163610"></a><a name="b4759749163610"></a>contain</strong>: Expands the image to the maximum size so that the height and width of the image are applicable to the content area.</li><li><strong id="b437619381712"><a name="b437619381712"></a><a name="b437619381712"></a>cover</strong>: Extends the background image to a large enough size so that the background image completely covers the background area. Some parts of the image may not be displayed in the background area.</li><li><strong id="b1425512535366"><a name="b1425512535366"></a><a name="b1425512535366"></a>auto</strong>: The original image width-height ratio is retained.</li></ul>
</li><li>The two <strong id="b13309145193614"><a name="b13309145193614"></a><a name="b13309145193614"></a>&lt;length&gt;</strong> values are as follows:<p id="p1840244924418"><a name="p1840244924418"></a><a name="p1840244924418"></a>Width and height of the background image. The first value indicates the width, and the second value indicates the height. If you only set one value, the other value is set to <strong id="b146661156143617"><a name="b146661156143617"></a><a name="b146661156143617"></a>auto</strong> by default.</p>
</li><li>The two <strong id="b1667415763613"><a name="b1667415763613"></a><a name="b1667415763613"></a>&lt;percentage&gt;</strong> values are as follows:<p id="p17936154410457"><a name="p17936154410457"></a><a name="p17936154410457"></a>Width and height of the background image in percentage of the parent element. The first value indicates the width, and the second value indicates the height. If you only set one value, the other value is set to <strong id="b1290500147"><a name="b1290500147"></a><a name="b1290500147"></a>auto</strong> by default.</p>
</li></ul>
</td>
</tr>
<tr id="r2f8ec5072a754e038c89308dd8997259"><td class="cellrowborder" valign="top" width="27.04270427042704%" headers="mcps1.1.5.1.1 "><p id="a9957170386754fb5b648ba2114bd52d4"><a name="a9957170386754fb5b648ba2114bd52d4"></a><a name="a9957170386754fb5b648ba2114bd52d4"></a>background-repeat</p>
</td>
<td class="cellrowborder" valign="top" width="20.402040204020402%" headers="mcps1.1.5.1.2 "><p id="a155b4cc325e747279694d36c2fa69bcc"><a name="a155b4cc325e747279694d36c2fa69bcc"></a><a name="a155b4cc325e747279694d36c2fa69bcc"></a>string</p>
</td>
<td class="cellrowborder" valign="top" width="11.601160116011602%" headers="mcps1.1.5.1.3 "><p id="a82029c0dc1d540cf994f690b451c48f4"><a name="a82029c0dc1d540cf994f690b451c48f4"></a><a name="a82029c0dc1d540cf994f690b451c48f4"></a>repeat</p>
</td>
<td class="cellrowborder" valign="top" width="40.954095409540955%" headers="mcps1.1.5.1.4 "><p id="afb8e41c117884b368a0f1df348be8e54"><a name="afb8e41c117884b368a0f1df348be8e54"></a><a name="afb8e41c117884b368a0f1df348be8e54"></a>How a background image is repeatedly drawn. By default, a background image is repeated both horizontally and vertically.</p>
<a name="ul8236153103612"></a><a name="ul8236153103612"></a><ul id="ul8236153103612"><li><strong id="b1363463710"><a name="b1363463710"></a><a name="b1363463710"></a>repeat</strong>: Repeatedly draws images along the x-axis and y-axis at the same time.</li><li><strong id="b267416916377"><a name="b267416916377"></a><a name="b267416916377"></a>repeat-x</strong>: Repeatedly draws images along the x-axis.</li><li><strong id="b625561011379"><a name="b625561011379"></a><a name="b625561011379"></a>repeat-y</strong>: Repeatedly draws images along the y-axis.</li><li><strong id="b1122181133715"><a name="b1122181133715"></a><a name="b1122181133715"></a>no-repeat</strong>: The image is not drawn repeatedly.</li></ul>
</td>
</tr>
<tr id="r74d37bef16544cddbabf94a6c0d8f0f6"><td class="cellrowborder" valign="top" width="27.04270427042704%" headers="mcps1.1.5.1.1 "><p id="a709eb4a9fa87428897bebb4a98693df2"><a name="a709eb4a9fa87428897bebb4a98693df2"></a><a name="a709eb4a9fa87428897bebb4a98693df2"></a>background-position</p>
</td>
<td class="cellrowborder" valign="top" width="20.402040204020402%" headers="mcps1.1.5.1.2 "><a name="ul8874155216502"></a><a name="ul8874155216502"></a><ul id="ul8874155216502"><li>string string</li><li>&lt;length&gt; &lt;length&gt;</li><li>&lt;percentage&gt; &lt;percentage&gt;</li></ul>
</td>
<td class="cellrowborder" valign="top" width="11.601160116011602%" headers="mcps1.1.5.1.3 "><p id="a6f8f5d1c92f447bd868a841ad1a33cb1"><a name="a6f8f5d1c92f447bd868a841ad1a33cb1"></a><a name="a6f8f5d1c92f447bd868a841ad1a33cb1"></a>0px 0px</p>
</td>
<td class="cellrowborder" valign="top" width="40.954095409540955%" headers="mcps1.1.5.1.4 "><a name="ul1590812103363"></a><a name="ul1590812103363"></a><ul id="ul1590812103363"><li>Using keywords: If only one keyword is specified, the other value is <strong id="b5234102011540"><a name="b5234102011540"></a><a name="b5234102011540"></a>center</strong> by default. The two values define the horizontal position and vertical position, respectively.<a name="ul1453531734716"></a><a name="ul1453531734716"></a><ul id="ul1453531734716"><li><strong id="b0982111273712"><a name="b0982111273712"></a><a name="b0982111273712"></a>left</strong>: leftmost in the horizontal direction</li><li><strong id="b866713583912"><a name="b866713583912"></a><a name="b866713583912"></a>right</strong>: rightmost in the horizontal direction</li><li><strong id="b5886013193716"><a name="b5886013193716"></a><a name="b5886013193716"></a>top</strong>: top in the vertical direction</li><li><strong id="b84197142376"><a name="b84197142376"></a><a name="b84197142376"></a>bottom</strong>: bottom in the vertical direction</li><li><strong id="b14894114103710"><a name="b14894114103710"></a><a name="b14894114103710"></a>center</strong>: center position</li></ul>
</li></ul>
<a name="ul10908121023615"></a><a name="ul10908121023615"></a><ul id="ul10908121023615"><li>Using <strong id="b11401615193715"><a name="b11401615193715"></a><a name="b11401615193715"></a>&lt;length&gt;</strong>: The first value indicates the horizontal position, and the second value indicates the vertical position. <strong id="b1341381819379"><a name="b1341381819379"></a><a name="b1341381819379"></a>0 0</strong> indicates the upper left corner. The unit is pixel. If only one value is specified, the other one is <strong id="b48671516183714"><a name="b48671516183714"></a><a name="b48671516183714"></a>50%</strong>.</li><li>Using <strong id="b5492717163712"><a name="b5492717163712"></a><a name="b5492717163712"></a>&lt;percentage&gt;</strong>: The first value indicates the horizontal position, and the second value indicates the vertical position. <strong id="b164741723183712"><a name="b164741723183712"></a><a name="b164741723183712"></a>0% 0%</strong> indicates the upper left corner. <strong id="b64022245377"><a name="b64022245377"></a><a name="b64022245377"></a>100% 100%</strong> indicates the lower right corner. If only one value is specified, the other one is <strong id="b7893424163718"><a name="b7893424163718"></a><a name="b7893424163718"></a>50%</strong>.</li><li>Using both <strong id="b154811725193718"><a name="b154811725193718"></a><a name="b154811725193718"></a>&lt;percentage&gt;</strong> and <strong id="b34834254377"><a name="b34834254377"></a><a name="b34834254377"></a>&lt;length&gt;</strong>.</li></ul>
</td>
</tr>
<tr id="row1994075164514"><td class="cellrowborder" valign="top" width="27.04270427042704%" headers="mcps1.1.5.1.1 "><p id="p17940151124510"><a name="p17940151124510"></a><a name="p17940151124510"></a>box-shadow<sup id="sup787912854114"><a name="sup787912854114"></a><a name="sup787912854114"></a>5+</sup></p>
</td>
<td class="cellrowborder" valign="top" width="20.402040204020402%" headers="mcps1.1.5.1.2 "><p id="p194095154515"><a name="p194095154515"></a><a name="p194095154515"></a>string</p>
</td>
<td class="cellrowborder" valign="top" width="11.601160116011602%" headers="mcps1.1.5.1.3 "><p id="p169401351174518"><a name="p169401351174518"></a><a name="p169401351174518"></a>0</p>
</td>
<td class="cellrowborder" valign="top" width="40.954095409540955%" headers="mcps1.1.5.1.4 "><p id="p15549650195115"><a name="p15549650195115"></a><a name="p15549650195115"></a>Shadow style of the current component. The value consists of the horizontal position (mandatory), vertical position (mandatory), fuzzy radius (optional, default value: <strong id="b1191123116548"><a name="b1191123116548"></a><a name="b1191123116548"></a>0</strong>), extension distance (optional, default value: <strong id="b17911331135415"><a name="b17911331135415"></a><a name="b17911331135415"></a>0</strong>), and color (optional, default value: <strong id="b2091173111540"><a name="b2091173111540"></a><a name="b2091173111540"></a>black</strong>) of the shadow.</p>
<p id="p1159519921410"><a name="p1159519921410"></a><a name="p1159519921410"></a>Syntax: <strong id="b8462151851412"><a name="b8462151851412"></a><a name="b8462151851412"></a>box-shadow:</strong><em id="i14921019151415"><a name="i14921019151415"></a><a name="i14921019151415"></a> h-shadow v-shadow blur spread color</em></p>
<p id="p1431193714518"><a name="p1431193714518"></a><a name="p1431193714518"></a>Example:</p>
<a name="ul131475255546"></a><a name="ul131475255546"></a><ul id="ul131475255546"><li>box-shadow :10px 20px 5px 10px #888888</li><li>box-shadow :100px 100px 30px red</li><li>box-shadow :-100px -100px 0px 40px</li></ul>
</td>
</tr>
<tr id="row82361948145612"><td class="cellrowborder" valign="top" width="27.04270427042704%" headers="mcps1.1.5.1.1 "><p id="p1823644815567"><a name="p1823644815567"></a><a name="p1823644815567"></a>filter<sup id="sup1229754054112"><a name="sup1229754054112"></a><a name="sup1229754054112"></a>5+</sup></p>
</td>
<td class="cellrowborder" valign="top" width="20.402040204020402%" headers="mcps1.1.5.1.2 "><p id="p92361748195619"><a name="p92361748195619"></a><a name="p92361748195619"></a>string</p>
</td>
<td class="cellrowborder" valign="top" width="11.601160116011602%" headers="mcps1.1.5.1.3 "><p id="p92369486566"><a name="p92369486566"></a><a name="p92369486566"></a>-</p>
</td>
<td class="cellrowborder" valign="top" width="40.954095409540955%" headers="mcps1.1.5.1.4 "><p id="p18913655131410"><a name="p18913655131410"></a><a name="p18913655131410"></a>Radius of the blur area within the component layout. If the radius is not set, the default value <strong id="b13575134219519"><a name="b13575134219519"></a><a name="b13575134219519"></a>0</strong> (no blur area) is used. Percentage values are not supported.</p>
<p id="p52361548125619"><a name="p52361548125619"></a><a name="p52361548125619"></a>Syntax: <strong id="b15182122117599"><a name="b15182122117599"></a><a name="b15182122117599"></a>filter: blur(px)</strong></p>
<p id="p15591725115713"><a name="p15591725115713"></a><a name="p15591725115713"></a>Example:</p>
<p id="p192108318564"><a name="p192108318564"></a><a name="p192108318564"></a>filter: blur(10px)</p>
</td>
</tr>
<tr id="row673615525313"><td class="cellrowborder" valign="top" width="27.04270427042704%" headers="mcps1.1.5.1.1 "><p id="p1973618528317"><a name="p1973618528317"></a><a name="p1973618528317"></a>backdrop-filter<sup id="sup1384544716411"><a name="sup1384544716411"></a><a name="sup1384544716411"></a>5+</sup></p>
</td>
<td class="cellrowborder" valign="top" width="20.402040204020402%" headers="mcps1.1.5.1.2 "><p id="p1473620522315"><a name="p1473620522315"></a><a name="p1473620522315"></a>string</p>
</td>
<td class="cellrowborder" valign="top" width="11.601160116011602%" headers="mcps1.1.5.1.3 "><p id="p873645220314"><a name="p873645220314"></a><a name="p873645220314"></a>-</p>
</td>
<td class="cellrowborder" valign="top" width="40.954095409540955%" headers="mcps1.1.5.1.4 "><p id="p31725155158"><a name="p31725155158"></a><a name="p31725155158"></a>Radius of the background blur area within the component layout. If the radius is not set, the default value <strong id="b1321710397598"><a name="b1321710397598"></a><a name="b1321710397598"></a>0</strong> (no background blur) is used. Percentage values are not supported.</p>
<p id="p208828572419"><a name="p208828572419"></a><a name="p208828572419"></a>Syntax: <strong id="b1399414367598"><a name="b1399414367598"></a><a name="b1399414367598"></a>backdrop-filter: blur(px)</strong></p>
<p id="p17592112545711"><a name="p17592112545711"></a><a name="p17592112545711"></a>Example:</p>
<p id="p13989132119565"><a name="p13989132119565"></a><a name="p13989132119565"></a>backdrop-filter: blur(10px)</p>
</td>
</tr>
<tr id="rebe2f395a6c34b04be864a46ba6b10ae"><td class="cellrowborder" valign="top" width="27.04270427042704%" headers="mcps1.1.5.1.1 "><p id="p134581712103910"><a name="p134581712103910"></a><a name="p134581712103910"></a>opacity</p>
</td>
<td class="cellrowborder" valign="top" width="20.402040204020402%" headers="mcps1.1.5.1.2 "><p id="a45185999ae584676af4c36467c2ade8b"><a name="a45185999ae584676af4c36467c2ade8b"></a><a name="a45185999ae584676af4c36467c2ade8b"></a>number</p>
</td>
<td class="cellrowborder" valign="top" width="11.601160116011602%" headers="mcps1.1.5.1.3 "><p id="a09ff20dda8e44794bca18c84f413d972"><a name="a09ff20dda8e44794bca18c84f413d972"></a><a name="a09ff20dda8e44794bca18c84f413d972"></a>1</p>
</td>
<td class="cellrowborder" valign="top" width="40.954095409540955%" headers="mcps1.1.5.1.4 "><p id="p122515161139"><a name="p122515161139"></a><a name="p122515161139"></a>Opacity of an element. The value ranges from <strong id="b1871715526385"><a name="b1871715526385"></a><a name="b1871715526385"></a>0</strong> to <strong id="b177181452103815"><a name="b177181452103815"></a><a name="b177181452103815"></a>1</strong>. The value <strong id="b13718155210380"><a name="b13718155210380"></a><a name="b13718155210380"></a>1</strong> means opaque, and <strong id="b6718152103818"><a name="b6718152103818"></a><a name="b6718152103818"></a>0</strong> means completely transparent.</p>
</td>
</tr>
<tr id="r0dd61199ee2f4b64bd93b7448bbde433"><td class="cellrowborder" valign="top" width="27.04270427042704%" headers="mcps1.1.5.1.1 "><p id="aeda9e2f8d8344958bf4f43d429dcb55e"><a name="aeda9e2f8d8344958bf4f43d429dcb55e"></a><a name="aeda9e2f8d8344958bf4f43d429dcb55e"></a>display</p>
</td>
<td class="cellrowborder" valign="top" width="20.402040204020402%" headers="mcps1.1.5.1.2 "><p id="p1544115441446"><a name="p1544115441446"></a><a name="p1544115441446"></a>string</p>
<p id="aaaa164aa970b490fb048e5f260f1c661"><a name="aaaa164aa970b490fb048e5f260f1c661"></a><a name="aaaa164aa970b490fb048e5f260f1c661"></a></p>
</td>
<td class="cellrowborder" valign="top" width="11.601160116011602%" headers="mcps1.1.5.1.3 "><p id="aa5ce61466c9847dbb7f44852338d9006"><a name="aa5ce61466c9847dbb7f44852338d9006"></a><a name="aa5ce61466c9847dbb7f44852338d9006"></a>flex</p>
</td>
<td class="cellrowborder" valign="top" width="40.954095409540955%" headers="mcps1.1.5.1.4 "><p id="p23704018414"><a name="p23704018414"></a><a name="p23704018414"></a>How and whether to display the box containing an element. Available values are as follows:</p>
<a name="ul12227103394916"></a><a name="ul12227103394916"></a><ul id="ul12227103394916"><li><strong id="b57468289377"><a name="b57468289377"></a><a name="b57468289377"></a>flex</strong>: flexible layout</li><li><strong id="b18887133293920"><a name="b18887133293920"></a><a name="b18887133293920"></a>none</strong>: The element is hidden.</li></ul>
</td>
</tr>
<tr id="r2260108545704aeb885aa4e3fd8cdbcb"><td class="cellrowborder" valign="top" width="27.04270427042704%" headers="mcps1.1.5.1.1 "><p id="aa2ed1da39c8e4ad78829712734226ab9"><a name="aa2ed1da39c8e4ad78829712734226ab9"></a><a name="aa2ed1da39c8e4ad78829712734226ab9"></a>visibility</p>
</td>
<td class="cellrowborder" valign="top" width="20.402040204020402%" headers="mcps1.1.5.1.2 "><p id="p15475737486"><a name="p15475737486"></a><a name="p15475737486"></a>string</p>
<p id="aabfb0eb044194745af56c313f40e7781"><a name="aabfb0eb044194745af56c313f40e7781"></a><a name="aabfb0eb044194745af56c313f40e7781"></a></p>
</td>
<td class="cellrowborder" valign="top" width="11.601160116011602%" headers="mcps1.1.5.1.3 "><p id="acaca80d4ef9a4f0d87adf92cb2d1ff9a"><a name="acaca80d4ef9a4f0d87adf92cb2d1ff9a"></a><a name="acaca80d4ef9a4f0d87adf92cb2d1ff9a"></a>visible</p>
</td>
<td class="cellrowborder" valign="top" width="40.954095409540955%" headers="mcps1.1.5.1.4 "><p id="p1568839154517"><a name="p1568839154517"></a><a name="p1568839154517"></a>Whether to display an element. Invisible borders occupy layout space. (To remove the borders, set the <strong id="b15844103015378"><a name="b15844103015378"></a><a name="b15844103015378"></a>display</strong> attribute to <strong id="b4845153013712"><a name="b4845153013712"></a><a name="b4845153013712"></a>none</strong>.) Available values are as follows:</p>
<a name="ul751984164920"></a><a name="ul751984164920"></a><ul id="ul751984164920"><li><strong id="b17429331133711"><a name="b17429331133711"></a><a name="b17429331133711"></a>visible</strong>: The element is visible.</li><li><strong id="b109191231193710"><a name="b109191231193710"></a><a name="b109191231193710"></a>hidden</strong>: The element is hidden but still takes up space.</li></ul>
<div class="note" id="note4549524649"><a name="note4549524649"></a><a name="note4549524649"></a><span class="notetitle"> NOTE: </span><div class="notebody"><p id="p25499241642"><a name="p25499241642"></a><a name="p25499241642"></a>If both <strong id="b719810016405"><a name="b719810016405"></a><a name="b719810016405"></a>visibility</strong> and <strong id="b187052264018"><a name="b187052264018"></a><a name="b187052264018"></a>display</strong> are set, only <strong id="b107788924011"><a name="b107788924011"></a><a name="b107788924011"></a>display</strong> takes effect.</p>
</div></div>
</td>
</tr>
<tr id="r92a9fc54538249b5828980638c60071b"><td class="cellrowborder" valign="top" width="27.04270427042704%" headers="mcps1.1.5.1.1 "><p id="ad74a6a48aca7439e9344c18c26b4177e"><a name="ad74a6a48aca7439e9344c18c26b4177e"></a><a name="ad74a6a48aca7439e9344c18c26b4177e"></a>flex</p>
</td>
<td class="cellrowborder" valign="top" width="20.402040204020402%" headers="mcps1.1.5.1.2 "><p id="a2e6e5192a1534872be5fcfd9f83e3fdc"><a name="a2e6e5192a1534872be5fcfd9f83e3fdc"></a><a name="a2e6e5192a1534872be5fcfd9f83e3fdc"></a>number | string</p>
</td>
<td class="cellrowborder" valign="top" width="11.601160116011602%" headers="mcps1.1.5.1.3 "><p id="a8512eda38e25410685be8a8992890257"><a name="a8512eda38e25410685be8a8992890257"></a><a name="a8512eda38e25410685be8a8992890257"></a>-</p>
</td>
<td class="cellrowborder" valign="top" width="40.954095409540955%" headers="mcps1.1.5.1.4 "><p id="a11c317cdfa7d4066878d86c6b3bcbd82"><a name="a11c317cdfa7d4066878d86c6b3bcbd82"></a><a name="a11c317cdfa7d4066878d86c6b3bcbd82"></a>How to divide available space of the parent component for each child component.</p>
<p id="p6968144051814"><a name="p6968144051814"></a><a name="p6968144051814"></a>You can set one, two<sup id="sup894453017315"><a name="sup894453017315"></a><a name="sup894453017315"></a>5+</sup>, or three<sup id="sup1255142393114"><a name="sup1255142393114"></a><a name="sup1255142393114"></a>5+</sup> values for this style.</p>
<p id="p16733313171911"><a name="p16733313171911"></a><a name="p16733313171911"></a>Set one value in either of the following ways:</p>
<a name="ul93371539192211"></a><a name="ul93371539192211"></a><ul id="ul93371539192211"><li>A unitless number to set <strong id="b152581117781"><a name="b152581117781"></a><a name="b152581117781"></a>flex-grow</strong>.</li><li>A valid width value<sup id="sup133014373318"><a name="sup133014373318"></a><a name="sup133014373318"></a>5+</sup> to set <strong id="b182101331199"><a name="b182101331199"></a><a name="b182101331199"></a>flex-basis</strong>.</li></ul>
<p id="p6786171632018"><a name="p6786171632018"></a><a name="p6786171632018"></a>Set two values<sup id="sup39514502313"><a name="sup39514502313"></a><a name="sup39514502313"></a>5+</sup> in the following ways:</p>
<p id="p6400429122011"><a name="p6400429122011"></a><a name="p6400429122011"></a>The first value must be a unitless number used to set <strong id="b171516283129"><a name="b171516283129"></a><a name="b171516283129"></a>flex-grow</strong>. The second value must be either of the following:</p>
<a name="ul767043502219"></a><a name="ul767043502219"></a><ul id="ul767043502219"><li>A unitless number to set <strong id="b1428375141313"><a name="b1428375141313"></a><a name="b1428375141313"></a>flex-shrink</strong>.</li><li>A valid width value to set <strong id="b1632495651416"><a name="b1632495651416"></a><a name="b1632495651416"></a>flex-basis</strong>.</li></ul>
<p id="p748416351217"><a name="p748416351217"></a><a name="p748416351217"></a>Set three values<sup id="sup168671312151514"><a name="sup168671312151514"></a><a name="sup168671312151514"></a>5+</sup> in the following ways:</p>
<p id="p7373204832111"><a name="p7373204832111"></a><a name="p7373204832111"></a>The first value must be a unitless number used to set <strong id="b19419131221612"><a name="b19419131221612"></a><a name="b19419131221612"></a>flex-grow</strong>. The second value must be a unitless number used to set <strong id="b19378733181612"><a name="b19378733181612"></a><a name="b19378733181612"></a>flex-shrink</strong>. The third value must be a valid width value used to set <strong id="b47717118176"><a name="b47717118176"></a><a name="b47717118176"></a>flex-basis</strong>.</p>
<div class="note" id="note34891253201520"><a name="note34891253201520"></a><a name="note34891253201520"></a><span class="notetitle"> NOTE: </span><div class="notebody"><p id="p1248915538152"><a name="p1248915538152"></a><a name="p1248915538152"></a>This style takes effect only when the container is any of the following components: <strong id="b17156153131"><a name="b17156153131"></a><a name="b17156153131"></a>&lt;div&gt;</strong>, <strong id="b1201415151311"><a name="b1201415151311"></a><a name="b1201415151311"></a>&lt;list-item&gt;</strong>, <strong id="b72031515132"><a name="b72031515132"></a><a name="b72031515132"></a>&lt;refresh&gt;</strong>, <strong id="b1920131551310"><a name="b1920131551310"></a><a name="b1920131551310"></a>&lt;stepper-item&gt;</strong><sup id="sup17201815121317"><a name="sup17201815121317"></a><a name="sup17201815121317"></a>5+</sup>, and <strong id="b2211915121313"><a name="b2211915121313"></a><a name="b2211915121313"></a>&lt;tabs&gt;</strong>.</p>
</div></div>
</td>
</tr>
<tr id="r5f813e3521f94c6e995388e103618445"><td class="cellrowborder" valign="top" width="27.04270427042704%" headers="mcps1.1.5.1.1 "><p id="a5d88cacaaf5c4f6a87390ab916b695c6"><a name="a5d88cacaaf5c4f6a87390ab916b695c6"></a><a name="a5d88cacaaf5c4f6a87390ab916b695c6"></a>flex-grow</p>
</td>
<td class="cellrowborder" valign="top" width="20.402040204020402%" headers="mcps1.1.5.1.2 "><p id="a2c379e3af283446da446f1631e572efd"><a name="a2c379e3af283446da446f1631e572efd"></a><a name="a2c379e3af283446da446f1631e572efd"></a>number</p>
</td>
<td class="cellrowborder" valign="top" width="11.601160116011602%" headers="mcps1.1.5.1.3 "><p id="aa374f6c7415a4ee48a06930d76c55be7"><a name="aa374f6c7415a4ee48a06930d76c55be7"></a><a name="aa374f6c7415a4ee48a06930d76c55be7"></a>0</p>
</td>
<td class="cellrowborder" valign="top" width="40.954095409540955%" headers="mcps1.1.5.1.4 "><p id="p4437122419557"><a name="p4437122419557"></a><a name="p4437122419557"></a>How much a child component will grow. The value specifies allocation of the remaining space on the main axis of the parent component. Size of available space = Container size - Total size of all child components. Value <strong id="b1682343583716"><a name="b1682343583716"></a><a name="b1682343583716"></a>0</strong> indicates that the child component does not grow.</p>
<div class="note" id="note201231734212"><a name="note201231734212"></a><a name="note201231734212"></a><span class="notetitle"> NOTE: </span><div class="notebody"><p id="p184555314553"><a name="p184555314553"></a><a name="p184555314553"></a>This style takes effect only when the container is any of the following components: <strong id="b18575165615499"><a name="b18575165615499"></a><a name="b18575165615499"></a>&lt;div&gt;</strong>, <strong id="b8575165618495"><a name="b8575165618495"></a><a name="b8575165618495"></a>&lt;list-item&gt;</strong>, <strong id="b125751756164917"><a name="b125751756164917"></a><a name="b125751756164917"></a>&lt;refresh&gt;</strong>, <strong id="b15751456104920"><a name="b15751456104920"></a><a name="b15751456104920"></a>&lt;stepper-item&gt;</strong><sup id="sup257595611492"><a name="sup257595611492"></a><a name="sup257595611492"></a>5+</sup>, and <strong id="b55761856114912"><a name="b55761856114912"></a><a name="b55761856114912"></a>&lt;tabs&gt;</strong>.</p>
</div></div>
</td>
</tr>
<tr id="r61282e986a5f4475a63704a514097c62"><td class="cellrowborder" valign="top" width="27.04270427042704%" headers="mcps1.1.5.1.1 "><p id="ac65ef7e2b1f24a13b09c495f643168c9"><a name="ac65ef7e2b1f24a13b09c495f643168c9"></a><a name="ac65ef7e2b1f24a13b09c495f643168c9"></a>flex-shrink</p>
</td>
<td class="cellrowborder" valign="top" width="20.402040204020402%" headers="mcps1.1.5.1.2 "><p id="a98e7d367f0e649699892ae5bad6ade37"><a name="a98e7d367f0e649699892ae5bad6ade37"></a><a name="a98e7d367f0e649699892ae5bad6ade37"></a>number</p>
</td>
<td class="cellrowborder" valign="top" width="11.601160116011602%" headers="mcps1.1.5.1.3 "><p id="a422d978368814d12a33201cb839060ee"><a name="a422d978368814d12a33201cb839060ee"></a><a name="a422d978368814d12a33201cb839060ee"></a>1</p>
</td>
<td class="cellrowborder" valign="top" width="40.954095409540955%" headers="mcps1.1.5.1.4 "><p id="ab032342dfe56460ca742800de482ca0f"><a name="ab032342dfe56460ca742800de482ca0f"></a><a name="ab032342dfe56460ca742800de482ca0f"></a>How much a child component will shrink. The shrink occurs only when the sum of default child component widths is greater than that of the parent component. Value <strong id="b783242395"><a name="b783242395"></a><a name="b783242395"></a>0</strong> indicates that the child component does not shrink.</p>
<div class="note" id="note147160917217"><a name="note147160917217"></a><a name="note147160917217"></a><span class="notetitle"> NOTE: </span><div class="notebody"><p id="p844914328577"><a name="p844914328577"></a><a name="p844914328577"></a>This style takes effect only when the container is any of the following components: <strong id="b1168212543127"><a name="b1168212543127"></a><a name="b1168212543127"></a>&lt;div&gt;</strong>, <strong id="b76821454121211"><a name="b76821454121211"></a><a name="b76821454121211"></a>&lt;list-item&gt;</strong>, <strong id="b1168255411126"><a name="b1168255411126"></a><a name="b1168255411126"></a>&lt;refresh&gt;</strong>, <strong id="b10682155415120"><a name="b10682155415120"></a><a name="b10682155415120"></a>&lt;stepper-item&gt;</strong><sup id="sup10683145491215"><a name="sup10683145491215"></a><a name="sup10683145491215"></a>5+</sup>, and <strong id="b1868385461211"><a name="b1868385461211"></a><a name="b1868385461211"></a>&lt;tabs&gt;</strong>.</p>
</div></div>
</td>
</tr>
<tr id="r7758e3a4a5934e188ff90936ec9de163"><td class="cellrowborder" valign="top" width="27.04270427042704%" headers="mcps1.1.5.1.1 "><p id="a82c323a994634032963169eeee1a55e4"><a name="a82c323a994634032963169eeee1a55e4"></a><a name="a82c323a994634032963169eeee1a55e4"></a>flex-basis</p>
</td>
<td class="cellrowborder" valign="top" width="20.402040204020402%" headers="mcps1.1.5.1.2 "><p id="p1148910787"><a name="p1148910787"></a><a name="p1148910787"></a>&lt;length&gt;</p>
<p id="a43613cf0c2184c0d8b44e8d292f6edb7"><a name="a43613cf0c2184c0d8b44e8d292f6edb7"></a><a name="a43613cf0c2184c0d8b44e8d292f6edb7"></a></p>
</td>
<td class="cellrowborder" valign="top" width="11.601160116011602%" headers="mcps1.1.5.1.3 "><p id="ab9e1c7dc25f840e58993af05c1d32109"><a name="ab9e1c7dc25f840e58993af05c1d32109"></a><a name="ab9e1c7dc25f840e58993af05c1d32109"></a>-</p>
</td>
<td class="cellrowborder" valign="top" width="40.954095409540955%" headers="mcps1.1.5.1.4 "><p id="a0993ef9b0ef64785a76e6310dd834f09"><a name="a0993ef9b0ef64785a76e6310dd834f09"></a><a name="a0993ef9b0ef64785a76e6310dd834f09"></a>Initial length of the flex item on the main axis.</p>
<div class="note" id="note62848141222"><a name="note62848141222"></a><a name="note62848141222"></a><span class="notetitle"> NOTE: </span><div class="notebody"><p id="p16711745115718"><a name="p16711745115718"></a><a name="p16711745115718"></a>This style takes effect only when the container is any of the following components: <strong id="b18795155631219"><a name="b18795155631219"></a><a name="b18795155631219"></a>&lt;div&gt;</strong>, <strong id="b107951056121217"><a name="b107951056121217"></a><a name="b107951056121217"></a>&lt;list-item&gt;</strong>, <strong id="b2795105619128"><a name="b2795105619128"></a><a name="b2795105619128"></a>&lt;refresh&gt;</strong>, <strong id="b1579510564126"><a name="b1579510564126"></a><a name="b1579510564126"></a>&lt;stepper-item&gt;</strong><sup id="sup187953565122"><a name="sup187953565122"></a><a name="sup187953565122"></a>5+</sup>, and <strong id="b11796456201211"><a name="b11796456201211"></a><a name="b11796456201211"></a>&lt;tabs&gt;</strong>.</p>
</div></div>
</td>
</tr>
<tr id="row68521132124719"><td class="cellrowborder" valign="top" width="27.04270427042704%" headers="mcps1.1.5.1.1 "><p id="p1852163211475"><a name="p1852163211475"></a><a name="p1852163211475"></a>align-self<sup id="sup188874714717"><a name="sup188874714717"></a><a name="sup188874714717"></a>6+</sup></p>
</td>
<td class="cellrowborder" valign="top" width="20.402040204020402%" headers="mcps1.1.5.1.2 "><p id="p1853113211479"><a name="p1853113211479"></a><a name="p1853113211479"></a>string</p>
</td>
<td class="cellrowborder" valign="top" width="11.601160116011602%" headers="mcps1.1.5.1.3 "><p id="p15208521144814"><a name="p15208521144814"></a><a name="p15208521144814"></a>-</p>
</td>
<td class="cellrowborder" valign="top" width="40.954095409540955%" headers="mcps1.1.5.1.4 "><p id="p18535328478"><a name="p18535328478"></a><a name="p18535328478"></a>Alignment mode on the cross axis of the parent element. This style overwrites the align-items style of the parent element. The align-items style is used only in the div and list styles of the parent container. Text alignment mode. Available values include:</p>
<a name="ul16801138134811"></a><a name="ul16801138134811"></a><ul id="ul16801138134811"><li><strong id="b83231255613"><a name="b83231255613"></a><a name="b83231255613"></a>stretch</strong>: Items are stretched to the same height or width as the container in the cross axis direction.</li><li><strong id="b63541297143"><a name="b63541297143"></a><a name="b63541297143"></a>flex-start</strong>: Items are aligned to the start of the cross axis.</li><li><strong id="b08443191414"><a name="b08443191414"></a><a name="b08443191414"></a>flex-end</strong>: Items are aligned to the end of the cross axis.</li><li><strong id="b164481932161412"><a name="b164481932161412"></a><a name="b164481932161412"></a>center</strong>: Items are aligned in the middle of the cross axis.</li><li><strong id="b1294619482035"><a name="b1294619482035"></a><a name="b1294619482035"></a>baseline</strong>: Items are aligned on the peracross axis.</li></ul>
</td>
</tr>
<tr id="r873309c7368d4074bbd6048bf6f7d8b6"><td class="cellrowborder" valign="top" width="27.04270427042704%" headers="mcps1.1.5.1.1 "><p id="a50180d720a374549ae72c848e53320cb"><a name="a50180d720a374549ae72c848e53320cb"></a><a name="a50180d720a374549ae72c848e53320cb"></a>position</p>
</td>
<td class="cellrowborder" valign="top" width="20.402040204020402%" headers="mcps1.1.5.1.2 "><p id="a63672ed9a4c040f7a6ec9c8089b79bb6"><a name="a63672ed9a4c040f7a6ec9c8089b79bb6"></a><a name="a63672ed9a4c040f7a6ec9c8089b79bb6"></a>string</p>
</td>
<td class="cellrowborder" valign="top" width="11.601160116011602%" headers="mcps1.1.5.1.3 "><p id="a2666820c71eb420485e4d20e55b4eabe"><a name="a2666820c71eb420485e4d20e55b4eabe"></a><a name="a2666820c71eb420485e4d20e55b4eabe"></a>relative</p>
</td>
<td class="cellrowborder" valign="top" width="40.954095409540955%" headers="mcps1.1.5.1.4 "><p id="ae28abf4e47a740efbd45a8f280577912"><a name="ae28abf4e47a740efbd45a8f280577912"></a><a name="ae28abf4e47a740efbd45a8f280577912"></a>Positioning type of an element. Dynamic changes are not supported.</p>
<a name="ul17185232185014"></a><a name="ul17185232185014"></a><ul id="ul17185232185014"><li><strong id="b1894911155394"><a name="b1894911155394"></a><a name="b1894911155394"></a>fixed</strong>: The element is positioned related to the browser window.</li><li><strong id="b823115152390"><a name="b823115152390"></a><a name="b823115152390"></a>absolute</strong>: The element is positioned absolutely to its parent element.</li><li><strong id="b736151417395"><a name="b736151417395"></a><a name="b736151417395"></a>relative</strong>: The element is positioned relative to its normal position.</li></ul>
<div class="note" id="note167617191219"><a name="note167617191219"></a><a name="note167617191219"></a><span class="notetitle"> NOTE: </span><div class="notebody"><p id="p1839092815101"><a name="p1839092815101"></a><a name="p1839092815101"></a>The <strong id="b13941713133910"><a name="b13941713133910"></a><a name="b13941713133910"></a>absolute</strong> attribute takes effect only when the parent component is <strong id="b1099913173916"><a name="b1099913173916"></a><a name="b1099913173916"></a>&lt;div&gt;</strong> or <strong id="b181001413123919"><a name="b181001413123919"></a><a name="b181001413123919"></a>&lt;stack&gt;</strong>.</p>
</div></div>
</td>
</tr>
<tr id="r134d69553376475c9aada631cc431396"><td class="cellrowborder" valign="top" width="27.04270427042704%" headers="mcps1.1.5.1.1 "><p id="a70405cb9696b4329ac7625af93310018"><a name="a70405cb9696b4329ac7625af93310018"></a><a name="a70405cb9696b4329ac7625af93310018"></a>[left|top<span id="ph14927143614712"><a name="ph14927143614712"></a><a name="ph14927143614712"></a>|right|bottom</span>]</p>
</td>
<td class="cellrowborder" valign="top" width="20.402040204020402%" headers="mcps1.1.5.1.2 "><p id="p1849062221214"><a name="p1849062221214"></a><a name="p1849062221214"></a>&lt;length&gt; | &lt;percentage&gt;<sup id="sup780503811531"><a name="sup780503811531"></a><a name="sup780503811531"></a>6+</sup></p>
</td>
<td class="cellrowborder" valign="top" width="11.601160116011602%" headers="mcps1.1.5.1.3 "><p id="a579ac7c03d1d46758ebaacd565d86ed3"><a name="a579ac7c03d1d46758ebaacd565d86ed3"></a><a name="a579ac7c03d1d46758ebaacd565d86ed3"></a>-</p>
</td>
<td class="cellrowborder" valign="top" width="40.954095409540955%" headers="mcps1.1.5.1.4 "><p id="a9a662a62cd9b40eaa0cb9ca082b6d1c2"><a name="a9a662a62cd9b40eaa0cb9ca082b6d1c2"></a><a name="a9a662a62cd9b40eaa0cb9ca082b6d1c2"></a><strong id="b481348173914"><a name="b481348173914"></a><a name="b481348173914"></a>left|top</strong><span id="ph4818118173914"><a name="ph4818118173914"></a><a name="ph4818118173914"></a><strong id="b68143833912"><a name="b68143833912"></a><a name="b68143833912"></a>|right|bottom</strong></span> must be used together with <strong id="b881916818394"><a name="b881916818394"></a><a name="b881916818394"></a>position</strong> to determine the offset position of an element.</p>
<a name="ul12671003525"></a><a name="ul12671003525"></a><ul id="ul12671003525"><li>The <strong id="b885117712398"><a name="b885117712398"></a><a name="b885117712398"></a>left</strong> attribute specifies the left edge position of the element. This attribute defines the offset between the left edge of a positioned element and that of a block included in the element.</li><li>The <strong id="b65591759395"><a name="b65591759395"></a><a name="b65591759395"></a>top</strong> attribute specifies the top edge position of the element. This attribute defines the offset between the top edge of a positioned element and that of a block included in the element.</li><li>The <strong id="b179013323910"><a name="b179013323910"></a><a name="b179013323910"></a>right</strong> attribute specifies the right edge position of the element. This attribute defines the offset between the right edge of a positioned element and that of a block included in the element. </li><li>The <strong id="b77091602397"><a name="b77091602397"></a><a name="b77091602397"></a>bottom</strong> attribute specifies the bottom edge position of the element. This attribute defines the offset between the bottom edge of a positioned element and that of a block included in the element. </li></ul>
</td>
</tr>
<tr id="row3707155785514"><td class="cellrowborder" valign="top" width="27.04270427042704%" headers="mcps1.1.5.1.1 "><p id="p582085817554"><a name="p582085817554"></a><a name="p582085817554"></a>[start | end]<sup id="sup072040165910"><a name="sup072040165910"></a><a name="sup072040165910"></a>6+</sup></p>
</td>
<td class="cellrowborder" valign="top" width="20.402040204020402%" headers="mcps1.1.5.1.2 "><p id="p1182055810551"><a name="p1182055810551"></a><a name="p1182055810551"></a>&lt;length&gt; | &lt;percentage&gt;</p>
</td>
<td class="cellrowborder" valign="top" width="11.601160116011602%" headers="mcps1.1.5.1.3 "><p id="p18820145810555"><a name="p18820145810555"></a><a name="p18820145810555"></a>-</p>
</td>
<td class="cellrowborder" valign="top" width="40.954095409540955%" headers="mcps1.1.5.1.4 "><p id="p3748160105710"><a name="p3748160105710"></a><a name="p3748160105710"></a><strong id="b466773714588"><a name="b466773714588"></a><a name="b466773714588"></a>start | end</strong> must be used together with <strong id="b18674173720587"><a name="b18674173720587"></a><a name="b18674173720587"></a>position</strong> to determine the offset of an element.</p>
<a name="ul177495065715"></a><a name="ul177495065715"></a><ul id="ul177495065715"><li>The <strong id="b118319333592"><a name="b118319333592"></a><a name="b118319333592"></a>start</strong> attribute specifies the start edge position of the element. This attribute defines the offset between the start edge of a positioned element and that of a block included in the element.</li><li>The <strong id="b20190832110"><a name="b20190832110"></a><a name="b20190832110"></a>end</strong> attribute specifies the end edge position of the element. This attribute defines the offset between the end edge of a positioned element and that of a block included in the element.</li></ul>
</td>
</tr>
<tr id="row18741629184812"><td class="cellrowborder" valign="top" width="27.04270427042704%" headers="mcps1.1.5.1.1 "><p id="p183768265013"><a name="p183768265013"></a><a name="p183768265013"></a>z-index<sup id="sup47906591838"><a name="sup47906591838"></a><a name="sup47906591838"></a>6+</sup></p>
</td>
<td class="cellrowborder" valign="top" width="20.402040204020402%" headers="mcps1.1.5.1.2 "><p id="p33757225014"><a name="p33757225014"></a><a name="p33757225014"></a>number</p>
</td>
<td class="cellrowborder" valign="top" width="11.601160116011602%" headers="mcps1.1.5.1.3 "><p id="p2037472185010"><a name="p2037472185010"></a><a name="p2037472185010"></a>-</p>
</td>
<td class="cellrowborder" valign="top" width="40.954095409540955%" headers="mcps1.1.5.1.4 "><p id="p235472205018"><a name="p235472205018"></a><a name="p235472205018"></a>Rendering sequence of child nodes under the same parent node. The larger the value is, the later the rendering data is.</p>
<div class="note" id="note2062416595525"><a name="note2062416595525"></a><a name="note2062416595525"></a><span class="notetitle"> NOTE: </span><div class="notebody"><p id="p1862510596524"><a name="p1862510596524"></a><a name="p1862510596524"></a>z-index does not support auto, and other styles such as opacity do not affect the rendering sequence of z-index.</p>
</div></div>
</td>
</tr>
<tr id="row81981557165511"><td class="cellrowborder" valign="top" width="27.04270427042704%" headers="mcps1.1.5.1.1 "><p id="p201997571556"><a name="p201997571556"></a><a name="p201997571556"></a>image-fill<sup id="sup173048147917"><a name="sup173048147917"></a><a name="sup173048147917"></a>6+</sup></p>
</td>
<td class="cellrowborder" valign="top" width="20.402040204020402%" headers="mcps1.1.5.1.2 "><p id="p12199165718558"><a name="p12199165718558"></a><a name="p12199165718558"></a>&lt;color&gt;</p>
</td>
<td class="cellrowborder" valign="top" width="11.601160116011602%" headers="mcps1.1.5.1.3 "><p id="p15199105785518"><a name="p15199105785518"></a><a name="p15199105785518"></a>-</p>
</td>
<td class="cellrowborder" valign="top" width="40.954095409540955%" headers="mcps1.1.5.1.4 "><p id="p819913575558"><a name="p819913575558"></a><a name="p819913575558"></a>Indicates the fill color for SVG images. The following components (and attributes) are supported: <strong id="b1762209242"><a name="b1762209242"></a><a name="b1762209242"></a>button</strong> (icon attribute), <strong id="b54348111246"><a name="b54348111246"></a><a name="b54348111246"></a>piece</strong> (icon attribute), <strong id="b1012610147412"><a name="b1012610147412"></a><a name="b1012610147412"></a>search</strong> (icon attribute), <strong id="b1820351718410"><a name="b1820351718410"></a><a name="b1820351718410"></a>input</strong> (headericon attribute), <strong id="b7501920640"><a name="b7501920640"></a><a name="b7501920640"></a>textarea</strong> (headericon attribute), and <strong id="b713010283412"><a name="b713010283412"></a><a name="b713010283412"></a>image</strong> (src attribute), and <strong id="b136173555"><a name="b136173555"></a><a name="b136173555"></a>toolbar-item</strong> (icon attribute).</p>
<p id="p10159166173611"><a name="p10159166173611"></a><a name="p10159166173611"></a>The <strong id="b75579543717"><a name="b75579543717"></a><a name="b75579543717"></a>fill</strong> color value in the SVG image file is replaced with the value of <strong id="b1929418161085"><a name="b1929418161085"></a><a name="b1929418161085"></a>image-fill</strong> during rendering, and is valid only for the fill attribute that is declared in the SVG image.</p>
</td>
</tr>
<tr id="row1123215188489"><td class="cellrowborder" valign="top" width="27.04270427042704%" headers="mcps1.1.5.1.1 "><p id="p82332182487"><a name="p82332182487"></a><a name="p82332182487"></a>clip-path<sup id="sup72421215138"><a name="sup72421215138"></a><a name="sup72421215138"></a>6+</sup></p>
</td>
<td class="cellrowborder" valign="top" width="20.402040204020402%" headers="mcps1.1.5.1.2 "><p id="p823311817485"><a name="p823311817485"></a><a name="p823311817485"></a>[ &lt;geometry-box&gt; || &lt;basic-shape&gt; ] | none</p>
</td>
<td class="cellrowborder" valign="top" width="11.601160116011602%" headers="mcps1.1.5.1.3 "><p id="p12330183481"><a name="p12330183481"></a><a name="p12330183481"></a>-</p>
</td>
<td class="cellrowborder" valign="top" width="40.954095409540955%" headers="mcps1.1.5.1.4 "><p id="p3233818114810"><a name="p3233818114810"></a><a name="p3233818114810"></a>Clip area of a component. Only the content within this area is displayed.</p>
<p id="p154319832714"><a name="p154319832714"></a><a name="p154319832714"></a><strong id="b4127241205410"><a name="b4127241205410"></a><a name="b4127241205410"></a>&lt;geometry-box&gt;</strong>: applicable scope of the clip area's width and height. The default value is <strong id="b1385554719580"><a name="b1385554719580"></a><a name="b1385554719580"></a>border-box</strong>. Available values include:</p>
<a name="ul17350142316276"></a><a name="ul17350142316276"></a><ul id="ul17350142316276"><li><strong id="b1768919150919"><a name="b1768919150919"></a><a name="b1768919150919"></a>margin-box</strong>: The width and height includes the margin.</li><li><strong id="b69741730917"><a name="b69741730917"></a><a name="b69741730917"></a>border-box</strong>: The width and height includes the border.</li><li><strong id="b5798204310116"><a name="b5798204310116"></a><a name="b5798204310116"></a>padding-box</strong>: The width and height includes the padding.</li><li><strong id="b35961231724"><a name="b35961231724"></a><a name="b35961231724"></a>content-box</strong>: The width and height does not include any margin, border, or padding.</li></ul>
<p id="p27639253501"><a name="p27639253501"></a><a name="p27639253501"></a><strong id="b183113521102"><a name="b183113521102"></a><a name="b183113521102"></a>&lt;basic-shape&gt;</strong>: shape of the clip area. Available values include:</p>
<a name="ul1217191102613"></a><a name="ul1217191102613"></a><ul id="ul1217191102613"><li><strong id="b77761644121114"><a name="b77761644121114"></a><a name="b77761644121114"></a>inset</strong>, in the format of inset( &lt;percentage&gt;{1,4} [ round &lt;'border-radius'&gt; ]? ).</li><li><strong id="b1777113712123"><a name="b1777113712123"></a><a name="b1777113712123"></a>circle</strong>, in the format of circle( [&amp;lt;percentage&amp;gt;]? [ at &lt;percentage&gt; &lt;percentage&gt; ]? ).</li><li><strong id="b9872444171217"><a name="b9872444171217"></a><a name="b9872444171217"></a>ellipse</strong>, in the format of ellipse([&amp;lt;percentage&amp;gt;{2}]? [ at &lt;percentage&gt; &lt;percentage&gt; ]? ).</li><li><strong id="b20483410139"><a name="b20483410139"></a><a name="b20483410139"></a>polygon</strong>, in the format of polygon( [ &lt;percentage&gt;&lt;percentage&gt;]# )</li><li><strong id="b1395604611137"><a name="b1395604611137"></a><a name="b1395604611137"></a>path</strong>, in the format of path( &lt;string&gt; ).</li></ul>
</td>
</tr>
<tr id="row1142541162310"><td class="cellrowborder" valign="top" width="27.04270427042704%" headers="mcps1.1.5.1.1 "><p id="p1442631102316"><a name="p1442631102316"></a><a name="p1442631102316"></a>mask-image<sup id="sup39819127293"><a name="sup39819127293"></a><a name="sup39819127293"></a>6+</sup></p>
</td>
<td class="cellrowborder" valign="top" width="20.402040204020402%" headers="mcps1.1.5.1.2 "><a name="ul1679352103015"></a><a name="ul1679352103015"></a><ul id="ul1679352103015"><li>&lt;linear-gradient&gt;</li><li>string</li></ul>
</td>
<td class="cellrowborder" valign="top" width="11.601160116011602%" headers="mcps1.1.5.1.3 "><p id="p144260132315"><a name="p144260132315"></a><a name="p144260132315"></a>-</p>
</td>
<td class="cellrowborder" valign="top" width="40.954095409540955%" headers="mcps1.1.5.1.4 "><p id="p142619115239"><a name="p142619115239"></a><a name="p142619115239"></a>Image used for the mask of a component:</p>
<p id="p19331162103919"><a name="p19331162103919"></a><a name="p19331162103919"></a>Gradient color mask, for example:</p>
<p id="p73311427390"><a name="p73311427390"></a><a name="p73311427390"></a><strong id="b09779722617"><a name="b09779722617"></a><a name="b09779722617"></a>linear-gradient(to left, black, white)</strong></p>
<p id="p183310263912"><a name="p183310263912"></a><a name="p183310263912"></a>Solid color mask, for example:</p>
<p id="p143319223910"><a name="p143319223910"></a><a name="p143319223910"></a><strong id="b154221931264"><a name="b154221931264"></a><a name="b154221931264"></a>linear-gradient(to right, grey , grey)</strong></p>
<p id="p1933119218398"><a name="p1933119218398"></a><a name="p1933119218398"></a>Mask filled by a local SVG image, for example, <strong id="b18353259122517"><a name="b18353259122517"></a><a name="b18353259122517"></a>url(common/mask.svg)</strong></p>
</td>
</tr>
<tr id="row1620144617234"><td class="cellrowborder" valign="top" width="27.04270427042704%" headers="mcps1.1.5.1.1 "><p id="p19620146162316"><a name="p19620146162316"></a><a name="p19620146162316"></a>mask-size<sup id="sup19969212192918"><a name="sup19969212192918"></a><a name="sup19969212192918"></a>6+</sup></p>
</td>
<td class="cellrowborder" valign="top" width="20.402040204020402%" headers="mcps1.1.5.1.2 "><a name="ul16293555102918"></a><a name="ul16293555102918"></a><ul id="ul16293555102918"><li>string</li><li>&lt;length&gt;&lt;length&gt;</li><li>&lt;percentage&gt; &lt;percentage&gt;</li></ul>
</td>
<td class="cellrowborder" valign="top" width="11.601160116011602%" headers="mcps1.1.5.1.3 "><p id="p2620154652312"><a name="p2620154652312"></a><a name="p2620154652312"></a>auto</p>
</td>
<td class="cellrowborder" valign="top" width="40.954095409540955%" headers="mcps1.1.5.1.4 "><p id="p265717128307"><a name="p265717128307"></a><a name="p265717128307"></a>Display size of the mask image. The setting is valid only when <strong id="b1032933892617"><a name="b1032933892617"></a><a name="b1032933892617"></a>mask-image</strong> is set to an image source.</p>
<p id="p7530122117243"><a name="p7530122117243"></a><a name="p7530122117243"></a>The <strong id="b1104597861"><a name="b1104597861"></a><a name="b1104597861"></a>string</strong> values are as follows:</p>
<a name="ul484762411309"></a><a name="ul484762411309"></a><ul id="ul484762411309"><li><strong id="b1176457667"><a name="b1176457667"></a><a name="b1176457667"></a>contain</strong>: Expands the image to the maximum size so that the height and width of the image are applicable to the content area.</li><li><strong id="b7163163515273"><a name="b7163163515273"></a><a name="b7163163515273"></a>cover</strong>: Extends the image to a large enough size so that it completely covers the background area. Some parts of the image may not be displayed in the background area.</li><li><strong id="b1974245036"><a name="b1974245036"></a><a name="b1974245036"></a>auto</strong>: The original image width-height ratio is retained.</li></ul>
<p id="p753017210249"><a name="p753017210249"></a><a name="p753017210249"></a><strong id="b19788050192816"><a name="b19788050192816"></a><a name="b19788050192816"></a>length</strong> indicates the width and height of the image. The first value indicates the width, and the second value indicates the height. If you only set one value, the other value is set to <strong id="b1744084695"><a name="b1744084695"></a><a name="b1744084695"></a>auto</strong> by default.</p>
<p id="p13530162192416"><a name="p13530162192416"></a><a name="p13530162192416"></a>When you set the width and height with percentage values, the image size is set in relative to the original size. The first value indicates the width, and the second value indicates the height. If you only set one value, the other value is set to <strong id="b260843713"><a name="b260843713"></a><a name="b260843713"></a>auto</strong> by default.</p>
</td>
</tr>
<tr id="row208901544153013"><td class="cellrowborder" valign="top" width="27.04270427042704%" headers="mcps1.1.5.1.1 "><p id="p128908448305"><a name="p128908448305"></a><a name="p128908448305"></a>mask-position<sup id="sup1836916162918"><a name="sup1836916162918"></a><a name="sup1836916162918"></a>6+</sup></p>
</td>
<td class="cellrowborder" valign="top" width="20.402040204020402%" headers="mcps1.1.5.1.2 "><a name="ul234618590304"></a><a name="ul234618590304"></a><ul id="ul234618590304"><li>string string</li><li>&lt;length&gt; &lt;length&gt;</li><li>&lt;percentage&gt; &lt;percentage&gt;</li></ul>
</td>
<td class="cellrowborder" valign="top" width="11.601160116011602%" headers="mcps1.1.5.1.3 "><p id="p1389084413010"><a name="p1389084413010"></a><a name="p1389084413010"></a>0px 0px</p>
</td>
<td class="cellrowborder" valign="top" width="40.954095409540955%" headers="mcps1.1.5.1.4 "><p id="p563114246318"><a name="p563114246318"></a><a name="p563114246318"></a>Display position of the mask image. The setting is valid only when <strong id="b13358144513357"><a name="b13358144513357"></a><a name="b13358144513357"></a>mask-image</strong> is set to an image source. Using keywords: If only one keyword is specified, the other value is <strong id="b105241458193513"><a name="b105241458193513"></a><a name="b105241458193513"></a>center</strong> by default. The two values define the horizontal position and vertical position, respectively.</p>
<p id="p158151314323"><a name="p158151314323"></a><a name="p158151314323"></a>The <strong id="b726573840"><a name="b726573840"></a><a name="b726573840"></a>string</strong> values are as follows:</p>
<a name="ul1565191933217"></a><a name="ul1565191933217"></a><ul id="ul1565191933217"><li><strong id="b359890451"><a name="b359890451"></a><a name="b359890451"></a>left</strong>: leftmost in the horizontal direction</li><li><strong id="b171018374"><a name="b171018374"></a><a name="b171018374"></a>right</strong>: rightmost in the horizontal direction</li><li><strong id="b2021110720"><a name="b2021110720"></a><a name="b2021110720"></a>top</strong>: top in the vertical direction</li><li><strong id="b1626985140"><a name="b1626985140"></a><a name="b1626985140"></a>bottom</strong>: bottom in the vertical direction</li><li><strong id="b82069316"><a name="b82069316"></a><a name="b82069316"></a>center</strong>: center position</li></ul>
<p id="p8631192415319"><a name="p8631192415319"></a><a name="p8631192415319"></a>Using <strong id="b1094679653"><a name="b1094679653"></a><a name="b1094679653"></a>&lt;length&gt;</strong>: The first value indicates the horizontal position, and the second value indicates the vertical position. <strong id="b1783832372"><a name="b1783832372"></a><a name="b1783832372"></a>0 0</strong> indicates the upper left corner. The unit is pixel. If only one value is specified, the other one is <strong id="b2089747492"><a name="b2089747492"></a><a name="b2089747492"></a>50%</strong>.</p>
<p id="p4632424173116"><a name="p4632424173116"></a><a name="p4632424173116"></a>Using <strong id="b1181683810"><a name="b1181683810"></a><a name="b1181683810"></a>&lt;percentage&gt;</strong>: The first value indicates the horizontal position, and the second value indicates the vertical position. <strong id="b934522266"><a name="b934522266"></a><a name="b934522266"></a>0% 0%</strong> indicates the upper left corner. <strong id="b1996254905"><a name="b1996254905"></a><a name="b1996254905"></a>100% 100%</strong> indicates the lower right corner. If only one value is specified, the other one is <strong id="b454638719"><a name="b454638719"></a><a name="b454638719"></a>50%</strong>.</p>
<p id="p6632122443117"><a name="p6632122443117"></a><a name="p6632122443117"></a>Using both <strong id="b1957886868"><a name="b1957886868"></a><a name="b1957886868"></a>&lt;percentage&gt;</strong> and <strong id="b1109884205"><a name="b1109884205"></a><a name="b1109884205"></a>&lt;length&gt;</strong>.</p>
</td>
</tr>
<tr id="row118287509458"><td class="cellrowborder" valign="top" width="27.04270427042704%" headers="mcps1.1.5.1.1 "><p id="p128281150144513"><a name="p128281150144513"></a><a name="p128281150144513"></a>border-image-source<sup id="sup19243191410013"><a name="sup19243191410013"></a><a name="sup19243191410013"></a>7+</sup></p>
</td>
<td class="cellrowborder" valign="top" width="20.402040204020402%" headers="mcps1.1.5.1.2 "><p id="p1082816504459"><a name="p1082816504459"></a><a name="p1082816504459"></a>string</p>
</td>
<td class="cellrowborder" valign="top" width="11.601160116011602%" headers="mcps1.1.5.1.3 "><p id="p982805004510"><a name="p982805004510"></a><a name="p982805004510"></a>-</p>
</td>
<td class="cellrowborder" valign="top" width="40.954095409540955%" headers="mcps1.1.5.1.4 "><p id="p1828135012459"><a name="p1828135012459"></a><a name="p1828135012459"></a>Border image of the specified element.</p>
<p id="p186361230114613"><a name="p186361230114613"></a><a name="p186361230114613"></a>Example:</p>
<p id="p16361430134618"><a name="p16361430134618"></a><a name="p16361430134618"></a>border-image-source: url("/common/images/border.png")</p>
</td>
</tr>
<tr id="row15772115124718"><td class="cellrowborder" valign="top" width="27.04270427042704%" headers="mcps1.1.5.1.1 "><p id="p1177295194716"><a name="p1177295194716"></a><a name="p1177295194716"></a>border-image-slice<sup id="sup1452910163014"><a name="sup1452910163014"></a><a name="sup1452910163014"></a>7+</sup></p>
</td>
<td class="cellrowborder" valign="top" width="20.402040204020402%" headers="mcps1.1.5.1.2 "><p id="p107724516472"><a name="p107724516472"></a><a name="p107724516472"></a>&lt;length&gt; | &lt;percentage&gt;</p>
</td>
<td class="cellrowborder" valign="top" width="11.601160116011602%" headers="mcps1.1.5.1.3 "><p id="p6772145184717"><a name="p6772145184717"></a><a name="p6772145184717"></a>0</p>
</td>
<td class="cellrowborder" valign="top" width="40.954095409540955%" headers="mcps1.1.5.1.4 "><p id="p1077219518478"><a name="p1077219518478"></a><a name="p1077219518478"></a>Padding of the image.</p>
<p id="p10458230144817"><a name="p10458230144817"></a><a name="p10458230144817"></a>The attribute can have one to four values:</p>
<p id="p17458143094817"><a name="p17458143094817"></a><a name="p17458143094817"></a>If you set only one value, it specifies the padding for four sides.</p>
<p id="p74581930134818"><a name="p74581930134818"></a><a name="p74581930134818"></a>If you set two values, the first value specifies the top and bottom padding, and the second value specifies the left and right padding.</p>
<p id="p144581530114818"><a name="p144581530114818"></a><a name="p144581530114818"></a>If you set three values, the first value specifies the top padding, the second value specifies the left and right padding, and the third value specifies the bottom padding.</p>
<p id="p54581730104812"><a name="p54581730104812"></a><a name="p54581730104812"></a>If you set four values, they respectively specify the padding for top, right, bottom, and left sides (in clockwise order).</p>
</td>
</tr>
<tr id="row16936853134810"><td class="cellrowborder" valign="top" width="27.04270427042704%" headers="mcps1.1.5.1.1 "><p id="p69367530487"><a name="p69367530487"></a><a name="p69367530487"></a>border-image-width<sup id="sup10426101817011"><a name="sup10426101817011"></a><a name="sup10426101817011"></a>7+</sup></p>
</td>
<td class="cellrowborder" valign="top" width="20.402040204020402%" headers="mcps1.1.5.1.2 "><p id="p189361653134813"><a name="p189361653134813"></a><a name="p189361653134813"></a>&lt;length&gt; | &lt;percentage&gt;</p>
</td>
<td class="cellrowborder" valign="top" width="11.601160116011602%" headers="mcps1.1.5.1.3 "><p id="p1293610533481"><a name="p1293610533481"></a><a name="p1293610533481"></a>0</p>
</td>
<td class="cellrowborder" valign="top" width="40.954095409540955%" headers="mcps1.1.5.1.4 "><p id="p19936125310481"><a name="p19936125310481"></a><a name="p19936125310481"></a>Width of the border image.</p>
<p id="p1975945114498"><a name="p1975945114498"></a><a name="p1975945114498"></a>If you set only one value, it specifies the width for four sides.</p>
<p id="p875917519493"><a name="p875917519493"></a><a name="p875917519493"></a>If you set two values, the first value specifies the top and bottom width, and the second value specifies the left and right width.</p>
<p id="p375975111493"><a name="p375975111493"></a><a name="p375975111493"></a>If you set three values, the first value specifies the top width, the second value specifies the left and right width, and the third value specifies the bottom width.</p>
<p id="p1767175114494"><a name="p1767175114494"></a><a name="p1767175114494"></a>If you set four values, they respectively specify the width for top, right, bottom, and left sides (in clockwise order).</p>
</td>
</tr>
<tr id="row14666115155018"><td class="cellrowborder" valign="top" width="27.04270427042704%" headers="mcps1.1.5.1.1 "><p id="p266619519509"><a name="p266619519509"></a><a name="p266619519509"></a>border-image-outset<sup id="sup1098614191002"><a name="sup1098614191002"></a><a name="sup1098614191002"></a>7+</sup></p>
</td>
<td class="cellrowborder" valign="top" width="20.402040204020402%" headers="mcps1.1.5.1.2 "><p id="p1866635155016"><a name="p1866635155016"></a><a name="p1866635155016"></a>&lt;length&gt; | &lt;percentage&gt;</p>
</td>
<td class="cellrowborder" valign="top" width="11.601160116011602%" headers="mcps1.1.5.1.3 "><p id="p1566620520503"><a name="p1566620520503"></a><a name="p1566620520503"></a>0</p>
</td>
<td class="cellrowborder" valign="top" width="40.954095409540955%" headers="mcps1.1.5.1.4 "><p id="p766695175016"><a name="p766695175016"></a><a name="p766695175016"></a>How far the border image can extend beyond the border box.</p>
<p id="p620321917512"><a name="p620321917512"></a><a name="p620321917512"></a>If you set only one value, it specifies the distance of the boarder image beyond the border on four sides.</p>
<p id="p16203119165118"><a name="p16203119165118"></a><a name="p16203119165118"></a>If you set two values, the first value specifies the distance of the boarder image's top and bottom sides beyond the boarder, and the second value specifies the distance of the boarder image's left and right sides beyond the boarder.</p>
<p id="p15203201935120"><a name="p15203201935120"></a><a name="p15203201935120"></a>If you set three values, the first value specifies the distance of the boarder image's top side beyond the boarder, the second value specifies the distance of the boarder image's left and right sides beyond the boarder, and the third value specifies the distance of the boarder image's bottom side beyond the boarder.</p>
<p id="p19203191995117"><a name="p19203191995117"></a><a name="p19203191995117"></a>If you set four values, they respectively specify the distance of the boarder image's top, right, bottom, and left sides beyond the boarder (in clockwise order).</p>
</td>
</tr>
<tr id="row1450318395541"><td class="cellrowborder" valign="top" width="27.04270427042704%" headers="mcps1.1.5.1.1 "><p id="p14503113925419"><a name="p14503113925419"></a><a name="p14503113925419"></a>border-image-repeat<sup id="sup205575211502"><a name="sup205575211502"></a><a name="sup205575211502"></a>7+</sup></p>
</td>
<td class="cellrowborder" valign="top" width="20.402040204020402%" headers="mcps1.1.5.1.2 "><p id="p125031039135411"><a name="p125031039135411"></a><a name="p125031039135411"></a>string</p>
</td>
<td class="cellrowborder" valign="top" width="11.601160116011602%" headers="mcps1.1.5.1.3 "><p id="p115039397544"><a name="p115039397544"></a><a name="p115039397544"></a>stretch</p>
</td>
<td class="cellrowborder" valign="top" width="40.954095409540955%" headers="mcps1.1.5.1.4 "><p id="p25034393547"><a name="p25034393547"></a><a name="p25034393547"></a>How the border image fills the border box.</p>
<p id="p1565619515552"><a name="p1565619515552"></a><a name="p1565619515552"></a><strong id="b17135141519202"><a name="b17135141519202"></a><a name="b17135141519202"></a>stretch</strong>: stretches the image to fill the border box.</p>
<p id="p1065685145518"><a name="p1065685145518"></a><a name="p1065685145518"></a><strong id="b8590723152011"><a name="b8590723152011"></a><a name="b8590723152011"></a>repeat</strong>: tiles the image to fill the border box.</p>
<p id="p15656195116551"><a name="p15656195116551"></a><a name="p15656195116551"></a><strong id="b125122912014"><a name="b125122912014"></a><a name="b125122912014"></a>round</strong>: tiles the image to fill the border box. When the image cannot be tiled for an integer number of times, it can be scaled based on the site requirements.</p>
</td>
</tr>
<tr id="row836255814556"><td class="cellrowborder" valign="top" width="27.04270427042704%" headers="mcps1.1.5.1.1 "><p id="p536220584558"><a name="p536220584558"></a><a name="p536220584558"></a>border-image<sup id="sup13625822203"><a name="sup13625822203"></a><a name="sup13625822203"></a>7+</sup></p>
</td>
<td class="cellrowborder" valign="top" width="20.402040204020402%" headers="mcps1.1.5.1.2 "><p id="p17362135835517"><a name="p17362135835517"></a><a name="p17362135835517"></a>string</p>
</td>
<td class="cellrowborder" valign="top" width="11.601160116011602%" headers="mcps1.1.5.1.3 "><p id="p736317581553"><a name="p736317581553"></a><a name="p736317581553"></a>-</p>
</td>
<td class="cellrowborder" valign="top" width="40.954095409540955%" headers="mcps1.1.5.1.4 "><p id="p636314586558"><a name="p636314586558"></a><a name="p636314586558"></a>Shorthand attribute. The options are as follows:</p>
<a name="ul192711844297"></a><a name="ul192711844297"></a><ul id="ul192711844297"><li>Attributes of the image border. The parameters include <strong id="b87661029122310"><a name="b87661029122310"></a><a name="b87661029122310"></a>border-image-source</strong>, <strong id="b5609433182310"><a name="b5609433182310"></a><a name="b5609433182310"></a>border-image-slice</strong>, <strong id="b21858391236"><a name="b21858391236"></a><a name="b21858391236"></a>border-image-width</strong>, <strong id="b124371434238"><a name="b124371434238"></a><a name="b124371434238"></a>border-image-outset</strong>, and <strong id="b1463045010235"><a name="b1463045010235"></a><a name="b1463045010235"></a>border-image-repeat</strong>, respectively meaning the padding, width of the border image, how far the border image can extend beyond the border box, and how the border image fills the border box. The default values are used if the parameters are not set.<p id="p2288416171016"><a name="p2288416171016"></a><a name="p2288416171016"></a>Syntax reference: <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/border-image-source" target="_blank" rel="noopener noreferrer">&lt;'border-image-source'&gt;</a> <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/Value_definition_syntax#double_bar" target="_blank" rel="noopener noreferrer">||</a> <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/border-image-slice" target="_blank" rel="noopener noreferrer">&lt;'border-image-slice'&gt;</a> <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/Value_definition_syntax#brackets" target="_blank" rel="noopener noreferrer">[</a> / <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/border-image-width" target="_blank" rel="noopener noreferrer">&lt;'border-image-width'&gt;</a> <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/Value_definition_syntax#single_bar" target="_blank" rel="noopener noreferrer">|</a> / <a href="https://developer.mozilla.org/zh-CN/docs/Web/CSS/border-image-width" target="_blank" rel="noopener noreferrer">&lt;'border-image-width'&gt;</a><a href="https://developer.mozilla.org/en-US/docs/Web/CSS/Value_definition_syntax#question_mark_" target="_blank" rel="noopener noreferrer">?</a> / <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/border-image-outset" target="_blank" rel="noopener noreferrer">&lt;'border-image-outset'&gt;</a> <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/Value_definition_syntax#brackets" target="_blank" rel="noopener noreferrer">]</a><a href="https://developer.mozilla.org/en-US/docs/Web/CSS/Value_definition_syntax#question_mark" target="_blank" rel="noopener noreferrer">?</a> <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/Value_definition_syntax#double_bar" target="_blank" rel="noopener noreferrer">||</a> <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/border-image-repeat" target="_blank" rel="noopener noreferrer">&lt;'border-image-repeat'&gt;</a></p>
</li></ul>
<a name="ul13090488916"></a><a name="ul13090488916"></a><ul id="ul13090488916"><li>Gradient color border.<p id="p4219102819109"><a name="p4219102819109"></a><a name="p4219102819109"></a>Example</p>
<p id="p42198283101"><a name="p42198283101"></a><a name="p42198283101"></a>border-image: linear-gradient(red, yellow) 10px</p>
</li></ul>
</td>
</tr>
</tbody>
</table>
>![](../../public_sys-resources/icon-note.gif) **NOTE:**
>The above-mentioned common styles are not mandatory.
> **NOTE**<br>
> The aforementioned universal styles are not mandatory.
## Example
### box-sizing
```html
<div class="container" onswipe="touchMove">
<text style="margin: 10px; box-sizing: content-box; width: 300px;height: 300px; border: blue; border-width: 20px;">
contentBox
</text>
<text style="margin: 10px; box-sizing: border-box; width: 300px;height: 300px;border: blue; border-width: 20px;">
borderBox
</text>
</div>
```
![en-us_image_0000001214837129](figures/en-us_image_0000001214837129.png)
# div<a name="EN-US_TOPIC_0000001127125106"></a>
# div
The **<div\>** component is a basic container that is used as the root node of the page structure or is used to group the content.
> **NOTE**<br>
> This component is supported since API version 4. Updates will be marked with a superscript to indicate their earliest API version.
## Required Permissions<a name="section11257113618419"></a>
The **\<div>** component is a basic container that is used as the root node of the page structure or is used to group the content.
## Required Permissions
None
## Child Components<a name="section9288143101012"></a>
Supported
## Child Components
## Attributes<a name="section2907183951110"></a>
Attributes in [Universal Attributes](js-components-common-attributes.md) are supported.
## Styles<a name="section10683162023215"></a>
In addition to the styles in [Universal Styles](js-components-common-styles.md), the following styles are supported.
<a name="table268312017326"></a>
<table><thead align="left"><tr id="row1268413205327"><th class="cellrowborder" valign="top" width="21.18788121187881%" id="mcps1.1.6.1.1"><p id="p76841320163214"><a name="p76841320163214"></a><a name="p76841320163214"></a>Name</p>
</th>
<th class="cellrowborder" valign="top" width="16.648335166483353%" id="mcps1.1.6.1.2"><p id="p1068492019329"><a name="p1068492019329"></a><a name="p1068492019329"></a>Type</p>
</th>
<th class="cellrowborder" valign="top" width="13.618638136186382%" id="mcps1.1.6.1.3"><p id="p1468462043218"><a name="p1468462043218"></a><a name="p1468462043218"></a>Default Value</p>
</th>
<th class="cellrowborder" valign="top" width="7.329267073292671%" id="mcps1.1.6.1.4"><p id="p968416201324"><a name="p968416201324"></a><a name="p968416201324"></a>Mandatory</p>
</th>
<th class="cellrowborder" valign="top" width="41.21587841215879%" id="mcps1.1.6.1.5"><p id="p1068412019321"><a name="p1068412019321"></a><a name="p1068412019321"></a>Description</p>
</th>
</tr>
</thead>
<tbody><tr id="row1768452033213"><td class="cellrowborder" valign="top" width="21.18788121187881%" headers="mcps1.1.6.1.1 "><p id="p1868410208328"><a name="p1868410208328"></a><a name="p1868410208328"></a>flex-direction</p>
</td>
<td class="cellrowborder" valign="top" width="16.648335166483353%" headers="mcps1.1.6.1.2 "><p id="p16684720193210"><a name="p16684720193210"></a><a name="p16684720193210"></a>string</p>
</td>
<td class="cellrowborder" valign="top" width="13.618638136186382%" headers="mcps1.1.6.1.3 "><p id="p168432083216"><a name="p168432083216"></a><a name="p168432083216"></a>row</p>
</td>
<td class="cellrowborder" valign="top" width="7.329267073292671%" headers="mcps1.1.6.1.4 "><p id="p26841120163215"><a name="p26841120163215"></a><a name="p26841120163215"></a>No</p>
</td>
<td class="cellrowborder" valign="top" width="41.21587841215879%" headers="mcps1.1.6.1.5 "><p id="p9684162011326"><a name="p9684162011326"></a><a name="p9684162011326"></a>Main axis direction of the flex container. Available values are as follows:</p>
<a name="ul166842020123216"></a><a name="ul166842020123216"></a><ul id="ul166842020123216"><li><strong id="b6448132113155"><a name="b6448132113155"></a><a name="b6448132113155"></a>column</strong>: Items are placed vertically from top to bottom.</li><li><strong id="b1655362851511"><a name="b1655362851511"></a><a name="b1655362851511"></a>row</strong>: Items are placed horizontally from left to right.</li></ul>
</td>
</tr>
<tr id="row1568472073219"><td class="cellrowborder" valign="top" width="21.18788121187881%" headers="mcps1.1.6.1.1 "><p id="p156841120203210"><a name="p156841120203210"></a><a name="p156841120203210"></a>flex-wrap</p>
</td>
<td class="cellrowborder" valign="top" width="16.648335166483353%" headers="mcps1.1.6.1.2 "><p id="p668422017329"><a name="p668422017329"></a><a name="p668422017329"></a>string</p>
</td>
<td class="cellrowborder" valign="top" width="13.618638136186382%" headers="mcps1.1.6.1.3 "><p id="p176841220203217"><a name="p176841220203217"></a><a name="p176841220203217"></a>nowrap</p>
</td>
<td class="cellrowborder" valign="top" width="7.329267073292671%" headers="mcps1.1.6.1.4 "><p id="p16851520143211"><a name="p16851520143211"></a><a name="p16851520143211"></a>No</p>
</td>
<td class="cellrowborder" valign="top" width="41.21587841215879%" headers="mcps1.1.6.1.5 "><p id="p9685102083216"><a name="p9685102083216"></a><a name="p9685102083216"></a>Whether flex items in the container are displayed in a single line or multiple lines. Currently, dynamic modification is not supported. Available values are as follows:</p>
<a name="ul2685520133215"></a><a name="ul2685520133215"></a><ul id="ul2685520133215"><li><strong id="b17130154919435"><a name="b17130154919435"></a><a name="b17130154919435"></a>nowrap</strong>: Items are displayed on a single axis.</li><li><strong id="b9317903440"><a name="b9317903440"></a><a name="b9317903440"></a>wrap</strong>: Items are displayed on multiple axes.</li></ul>
</td>
</tr>
<tr id="row56851920123213"><td class="cellrowborder" valign="top" width="21.18788121187881%" headers="mcps1.1.6.1.1 "><p id="p56857201320"><a name="p56857201320"></a><a name="p56857201320"></a>justify-content</p>
</td>
<td class="cellrowborder" valign="top" width="16.648335166483353%" headers="mcps1.1.6.1.2 "><p id="p268572015329"><a name="p268572015329"></a><a name="p268572015329"></a>string</p>
</td>
<td class="cellrowborder" valign="top" width="13.618638136186382%" headers="mcps1.1.6.1.3 "><p id="p96851220103216"><a name="p96851220103216"></a><a name="p96851220103216"></a>flex-start</p>
</td>
<td class="cellrowborder" valign="top" width="7.329267073292671%" headers="mcps1.1.6.1.4 "><p id="p1368522019327"><a name="p1368522019327"></a><a name="p1368522019327"></a>No</p>
</td>
<td class="cellrowborder" valign="top" width="41.21587841215879%" headers="mcps1.1.6.1.5 "><p id="p2685520183214"><a name="p2685520183214"></a><a name="p2685520183214"></a>How items are aligned along the main axis of the current line in a flex container. Available values are as follows:</p>
<a name="ul10685142083220"></a><a name="ul10685142083220"></a><ul id="ul10685142083220"><li><strong id="b1501318300"><a name="b1501318300"></a><a name="b1501318300"></a>flex-start</strong>: Items are packed towards the start row.</li><li><strong id="b44838392915"><a name="b44838392915"></a><a name="b44838392915"></a>flex-end</strong>: Items are packed towards the end row.</li><li><strong id="b1427203684411"><a name="b1427203684411"></a><a name="b1427203684411"></a>center</strong>: Items are centered along the row.</li><li><strong id="b22154711448"><a name="b22154711448"></a><a name="b22154711448"></a>space-between</strong>: Items are positioned with space between the rows.</li><li><strong id="b233020014456"><a name="b233020014456"></a><a name="b233020014456"></a>space-around</strong>: Items are positioned with space before, between, and after the rows.</li><li><strong id="b93731646175116"><a name="b93731646175116"></a><a name="b93731646175116"></a>space-evenly</strong><sup id="sup7995448141310"><a name="sup7995448141310"></a><a name="sup7995448141310"></a>5+</sup>: Items are arranged with even space between each two.</li></ul>
</td>
</tr>
<tr id="row1268518207327"><td class="cellrowborder" valign="top" width="21.18788121187881%" headers="mcps1.1.6.1.1 "><p id="p16685172073216"><a name="p16685172073216"></a><a name="p16685172073216"></a>align-items</p>
</td>
<td class="cellrowborder" valign="top" width="16.648335166483353%" headers="mcps1.1.6.1.2 "><p id="p14686102043215"><a name="p14686102043215"></a><a name="p14686102043215"></a>string</p>
</td>
<td class="cellrowborder" valign="top" width="13.618638136186382%" headers="mcps1.1.6.1.3 "><p id="p12686192073219"><a name="p12686192073219"></a><a name="p12686192073219"></a>stretch</p>
</td>
<td class="cellrowborder" valign="top" width="7.329267073292671%" headers="mcps1.1.6.1.4 "><p id="p968619206323"><a name="p968619206323"></a><a name="p968619206323"></a>No</p>
</td>
<td class="cellrowborder" valign="top" width="41.21587841215879%" headers="mcps1.1.6.1.5 "><p id="p968612093212"><a name="p968612093212"></a><a name="p968612093212"></a>How items are aligned along the cross axis of the current line in a flex container. Available values are as follows:</p>
<a name="ul1668642083219"></a><a name="ul1668642083219"></a><ul id="ul1668642083219"><li><strong id="b11551451152410"><a name="b11551451152410"></a><a name="b11551451152410"></a>stretch</strong>: Items are stretched to the same height or width as the container in the cross axis direction. </li><li><strong id="b121104330341"><a name="b121104330341"></a><a name="b121104330341"></a>flex-start</strong>: Items are aligned to the start of the cross axis.</li><li><strong id="b475319397428"><a name="b475319397428"></a><a name="b475319397428"></a>flex-end</strong>: Items are aligned to the end of the cross axis.</li><li><strong id="b29371949171513"><a name="b29371949171513"></a><a name="b29371949171513"></a>center</strong>: Items are aligned in the middle of the cross axis.</li></ul>
</td>
</tr>
<tr id="row13686520193219"><td class="cellrowborder" valign="top" width="21.18788121187881%" headers="mcps1.1.6.1.1 "><p id="p18686620103213"><a name="p18686620103213"></a><a name="p18686620103213"></a>align-content</p>
</td>
<td class="cellrowborder" valign="top" width="16.648335166483353%" headers="mcps1.1.6.1.2 "><p id="p368682043219"><a name="p368682043219"></a><a name="p368682043219"></a>string</p>
</td>
<td class="cellrowborder" valign="top" width="13.618638136186382%" headers="mcps1.1.6.1.3 "><p id="p76864208322"><a name="p76864208322"></a><a name="p76864208322"></a>flex-start</p>
</td>
<td class="cellrowborder" valign="top" width="7.329267073292671%" headers="mcps1.1.6.1.4 "><p id="p17687720143219"><a name="p17687720143219"></a><a name="p17687720143219"></a>No</p>
</td>
<td class="cellrowborder" valign="top" width="41.21587841215879%" headers="mcps1.1.6.1.5 "><p id="p10687112023210"><a name="p10687112023210"></a><a name="p10687112023210"></a>Multi-row alignment mode when there is extra space in the cross axis. Available values are as follows:</p>
<a name="ul156878209329"></a><a name="ul156878209329"></a><ul id="ul156878209329"><li><strong id="b136621415154616"><a name="b136621415154616"></a><a name="b136621415154616"></a>flex-start</strong>: All rows are packed towards the start of the cross axis. The start edge of the cross axis of the first row is aligned with the start edge of the cross axis of the container. All subsequent rows are aligned with the previous row.</li><li><strong id="b597516158475"><a name="b597516158475"></a><a name="b597516158475"></a>flex-end</strong>: All rows are packed towards the end of the cross axis. The end of the cross axis of the last row is aligned with the end of the cross axis of the container. All subsequent rows are aligned with the previous row.</li><li><strong id="b13497201184810"><a name="b13497201184810"></a><a name="b13497201184810"></a>center</strong>: All rows are packed towards the center of the container. Rows are close to each other and aligned with the center of the container. The spacing between the start of the container's cross axis and the first row is equal to the spacing between the end of the container's cross axis and the last row.</li><li><strong id="b1679416397492"><a name="b1679416397492"></a><a name="b1679416397492"></a>space-between</strong>: All rows are evenly distributed in the container. The spacing between two adjacent rows is the same. The start and end edges of the container's cross axis are aligned with the edges of the first and last rows, respectively.</li><li><strong id="b190019665015"><a name="b190019665015"></a><a name="b190019665015"></a>space-around</strong>: All rows are evenly distributed in the container, and the spacing between two adjacent lines is the same. The spacing between the start edge of the container's cross axis and the first row and that between the end edge and the last row are half of the spacing between two adjacent rows.</li></ul>
</td>
</tr>
<tr id="row668711200324"><td class="cellrowborder" valign="top" width="21.18788121187881%" headers="mcps1.1.6.1.1 "><p id="p1368732083214"><a name="p1368732083214"></a><a name="p1368732083214"></a>display</p>
</td>
<td class="cellrowborder" valign="top" width="16.648335166483353%" headers="mcps1.1.6.1.2 "><p id="p8687320183211"><a name="p8687320183211"></a><a name="p8687320183211"></a>string</p>
</td>
<td class="cellrowborder" valign="top" width="13.618638136186382%" headers="mcps1.1.6.1.3 "><p id="p168742043213"><a name="p168742043213"></a><a name="p168742043213"></a>flex</p>
</td>
<td class="cellrowborder" valign="top" width="7.329267073292671%" headers="mcps1.1.6.1.4 "><p id="p36871820113217"><a name="p36871820113217"></a><a name="p36871820113217"></a>No</p>
</td>
<td class="cellrowborder" valign="top" width="41.21587841215879%" headers="mcps1.1.6.1.5 "><p id="p7687920123212"><a name="p7687920123212"></a><a name="p7687920123212"></a>Type of the view box of the element. Currently, dynamic modification is not supported. Available values are as follows:</p>
<a name="ul168702017322"></a><a name="ul168702017322"></a><ul id="ul168702017322"><li><strong id="b1723224655016"><a name="b1723224655016"></a><a name="b1723224655016"></a>flex</strong>: flexible layout</li><li><strong id="b15510348175010"><a name="b15510348175010"></a><a name="b15510348175010"></a>grid</strong>: grid layout</li><li><strong id="b102151023161"><a name="b102151023161"></a><a name="b102151023161"></a>none</strong>: not rendered</li></ul>
</td>
</tr>
<tr id="row136872020123214"><td class="cellrowborder" valign="top" width="21.18788121187881%" headers="mcps1.1.6.1.1 "><p id="p126872208322"><a name="p126872208322"></a><a name="p126872208322"></a>grid-template-[columns|rows]</p>
</td>
<td class="cellrowborder" valign="top" width="16.648335166483353%" headers="mcps1.1.6.1.2 "><p id="p9687142016324"><a name="p9687142016324"></a><a name="p9687142016324"></a>string</p>
</td>
<td class="cellrowborder" valign="top" width="13.618638136186382%" headers="mcps1.1.6.1.3 "><p id="p9688112033216"><a name="p9688112033216"></a><a name="p9688112033216"></a>1 row, 1 column</p>
</td>
<td class="cellrowborder" valign="top" width="7.329267073292671%" headers="mcps1.1.6.1.4 "><p id="p1068812003213"><a name="p1068812003213"></a><a name="p1068812003213"></a>No</p>
</td>
<td class="cellrowborder" valign="top" width="41.21587841215879%" headers="mcps1.1.6.1.5 "><p id="p186883207326"><a name="p186883207326"></a><a name="p186883207326"></a>Number of rows and columns in the current grid layout. If this attribute is not set, one row and one column are displayed by default. This attribute is valid only when <strong id="b4125132113216"><a name="b4125132113216"></a><a name="b4125132113216"></a>display</strong> is set to <strong id="b12191152318329"><a name="b12191152318329"></a><a name="b12191152318329"></a>grid</strong>.</p>
<p id="p7688172013211"><a name="p7688172013211"></a><a name="p7688172013211"></a>For example, set <strong id="b1023814188516"><a name="b1023814188516"></a><a name="b1023814188516"></a>grid-template-columns</strong> to:</p>
<a name="ul3688920133220"></a><a name="ul3688920133220"></a><ul id="ul3688920133220"><li><strong id="b112413913347"><a name="b112413913347"></a><a name="b112413913347"></a>50px 100px 60px</strong>: There are three columns. The first column is 50 px, the second column is 100 px, and the third column is 60 px.</li><li><strong id="b6967342153412"><a name="b6967342153412"></a><a name="b6967342153412"></a>1fr 1fr 2fr</strong>: There are three columns, and the width allowed by the parent component is divided into four equal shares. The first column occupies one share, the second column occupies one share, and the third column occupies two shares.</li><li><strong id="b869516133514"><a name="b869516133514"></a><a name="b869516133514"></a>30% 20% 50%</strong>: There are three columns. The first column occupies 30% of the total width allowed by the parent component, the second column occupies 20%, and the third column occupies 50%.</li><li><strong id="b2099416428352"><a name="b2099416428352"></a><a name="b2099416428352"></a>repeat (2,100px)</strong>: There are two columns. The first column is 100 px, and the second column is 100 px.</li><li><strong id="b1528612819366"><a name="b1528612819366"></a><a name="b1528612819366"></a>repeat(auto-fill,100px)</strong><sup id="sup126181292519"><a name="sup126181292519"></a><a name="sup126181292519"></a>5+</sup>: Each column is 100 px and repeats to fill the cross axis. The number of columns is calculated based on the column size and the cross axis size.</li><li><strong id="b02617531161"><a name="b02617531161"></a><a name="b02617531161"></a>auto 1fr 1fr</strong>: There are three columns. The first column is adaptive to the width required by its child components. The remaining space is divided into two equal shares, one share occupied by each of the rest two columns.</li></ul>
</td>
</tr>
<tr id="row106881920143218"><td class="cellrowborder" valign="top" width="21.18788121187881%" headers="mcps1.1.6.1.1 "><p id="p66881020173213"><a name="p66881020173213"></a><a name="p66881020173213"></a>grid-[columns|rows]-gap</p>
</td>
<td class="cellrowborder" valign="top" width="16.648335166483353%" headers="mcps1.1.6.1.2 "><p id="p16688192063214"><a name="p16688192063214"></a><a name="p16688192063214"></a>&lt;length&gt;</p>
</td>
<td class="cellrowborder" valign="top" width="13.618638136186382%" headers="mcps1.1.6.1.3 "><p id="p15688920143215"><a name="p15688920143215"></a><a name="p15688920143215"></a>0</p>
</td>
<td class="cellrowborder" valign="top" width="7.329267073292671%" headers="mcps1.1.6.1.4 "><p id="p16688162003215"><a name="p16688162003215"></a><a name="p16688162003215"></a>No</p>
</td>
<td class="cellrowborder" valign="top" width="41.21587841215879%" headers="mcps1.1.6.1.5 "><p id="p96881920183213"><a name="p96881920183213"></a><a name="p96881920183213"></a>Size of the gap between two consecutive rows or columns in a grid layout. You can also use <strong id="b39881232191618"><a name="b39881232191618"></a><a name="b39881232191618"></a>grid-gap</strong> to set the same size of the gap between rows and columns. This attribute is valid only when <strong id="b49951732201611"><a name="b49951732201611"></a><a name="b49951732201611"></a>display</strong> is set to <strong id="b189964324166"><a name="b189964324166"></a><a name="b189964324166"></a>grid</strong>.</p>
</td>
</tr>
<tr id="row1268882053219"><td class="cellrowborder" valign="top" width="21.18788121187881%" headers="mcps1.1.6.1.1 "><p id="p1668942011327"><a name="p1668942011327"></a><a name="p1668942011327"></a>grid-row-[start|end]</p>
</td>
<td class="cellrowborder" valign="top" width="16.648335166483353%" headers="mcps1.1.6.1.2 "><p id="p11689620143210"><a name="p11689620143210"></a><a name="p11689620143210"></a>number</p>
</td>
<td class="cellrowborder" valign="top" width="13.618638136186382%" headers="mcps1.1.6.1.3 "><p id="p66891920143215"><a name="p66891920143215"></a><a name="p66891920143215"></a>-</p>
</td>
<td class="cellrowborder" valign="top" width="7.329267073292671%" headers="mcps1.1.6.1.4 "><p id="p17689152083218"><a name="p17689152083218"></a><a name="p17689152083218"></a>No</p>
</td>
<td class="cellrowborder" valign="top" width="41.21587841215879%" headers="mcps1.1.6.1.5 "><p id="p16689132033212"><a name="p16689132033212"></a><a name="p16689132033212"></a>Start and end row numbers of the current item in the grid layout. This attribute is valid only when <strong id="b1966015213323"><a name="b1966015213323"></a><a name="b1966015213323"></a>display</strong> of the parent component is <strong id="b116675210328"><a name="b116675210328"></a><a name="b116675210328"></a>grid</strong>. (The <strong id="b266720217326"><a name="b266720217326"></a><a name="b266720217326"></a>display</strong> attribute of the parent component can be set to <strong id="b1866713218329"><a name="b1866713218329"></a><a name="b1866713218329"></a>grid</strong> only for the <strong id="b136678243216"><a name="b136678243216"></a><a name="b136678243216"></a>&lt;div&gt;</strong> container.)</p>
</td>
</tr>
<tr id="row1968942013212"><td class="cellrowborder" valign="top" width="21.18788121187881%" headers="mcps1.1.6.1.1 "><p id="p26894201323"><a name="p26894201323"></a><a name="p26894201323"></a>grid-column-[start|end]</p>
</td>
<td class="cellrowborder" valign="top" width="16.648335166483353%" headers="mcps1.1.6.1.2 "><p id="p18689122018329"><a name="p18689122018329"></a><a name="p18689122018329"></a>number</p>
</td>
<td class="cellrowborder" valign="top" width="13.618638136186382%" headers="mcps1.1.6.1.3 "><p id="p26894206327"><a name="p26894206327"></a><a name="p26894206327"></a>-</p>
</td>
<td class="cellrowborder" valign="top" width="7.329267073292671%" headers="mcps1.1.6.1.4 "><p id="p668914203321"><a name="p668914203321"></a><a name="p668914203321"></a>No</p>
</td>
<td class="cellrowborder" valign="top" width="41.21587841215879%" headers="mcps1.1.6.1.5 "><p id="p1168942083212"><a name="p1168942083212"></a><a name="p1168942083212"></a>Start and end column numbers of the current item in the grid layout. This attribute is valid only when <strong id="b826524911361"><a name="b826524911361"></a><a name="b826524911361"></a>display</strong> of the parent component is <strong id="b1527010493361"><a name="b1527010493361"></a><a name="b1527010493361"></a>grid</strong>. (The <strong id="b22701449123614"><a name="b22701449123614"></a><a name="b22701449123614"></a>display</strong> attribute of the parent component can be set to <strong id="b1327011499366"><a name="b1327011499366"></a><a name="b1327011499366"></a>grid</strong> only for the <strong id="b122717491366"><a name="b122717491366"></a><a name="b122717491366"></a>&lt;div&gt;</strong> container.)</p>
</td>
</tr>
<tr id="row1689120153217"><td class="cellrowborder" valign="top" width="21.18788121187881%" headers="mcps1.1.6.1.1 "><p id="p368912011325"><a name="p368912011325"></a><a name="p368912011325"></a>grid-auto-flow<sup id="sup26892020153214"><a name="sup26892020153214"></a><a name="sup26892020153214"></a>5+</sup></p>
</td>
<td class="cellrowborder" valign="top" width="16.648335166483353%" headers="mcps1.1.6.1.2 "><p id="p20689112043215"><a name="p20689112043215"></a><a name="p20689112043215"></a>string</p>
</td>
<td class="cellrowborder" valign="top" width="13.618638136186382%" headers="mcps1.1.6.1.3 "><p id="p186893207322"><a name="p186893207322"></a><a name="p186893207322"></a>-</p>
</td>
<td class="cellrowborder" valign="top" width="7.329267073292671%" headers="mcps1.1.6.1.4 "><p id="p20689182003216"><a name="p20689182003216"></a><a name="p20689182003216"></a>No</p>
</td>
<td class="cellrowborder" valign="top" width="41.21587841215879%" headers="mcps1.1.6.1.5 "><p id="p176891320123210"><a name="p176891320123210"></a><a name="p176891320123210"></a>Using an algorithm to lay out the grid automatically. Available values are as follows:</p>
<a name="ul12689152083220"></a><a name="ul12689152083220"></a><ul id="ul12689152083220"><li><strong id="b193611954113620"><a name="b193611954113620"></a><a name="b193611954113620"></a>row</strong>: Elements are filled row by row. When there is no horizontal space in a row, a new row is added.</li><li><strong id="b5155845153318"><a name="b5155845153318"></a><a name="b5155845153318"></a>column</strong>: Elements are filled column by column. When there is no vertical space in a column, a new column is added.</li></ul>
</td>
</tr>
<tr id="row8465152118595"><td class="cellrowborder" valign="top" width="21.18788121187881%" headers="mcps1.1.6.1.1 "><p id="p446513211597"><a name="p446513211597"></a><a name="p446513211597"></a>overflow<sup id="sup14860336125911"><a name="sup14860336125911"></a><a name="sup14860336125911"></a>6+</sup></p>
</td>
<td class="cellrowborder" valign="top" width="16.648335166483353%" headers="mcps1.1.6.1.2 "><p id="p6465172105918"><a name="p6465172105918"></a><a name="p6465172105918"></a>string</p>
</td>
<td class="cellrowborder" valign="top" width="13.618638136186382%" headers="mcps1.1.6.1.3 "><p id="p1546592111596"><a name="p1546592111596"></a><a name="p1546592111596"></a>visible</p>
</td>
<td class="cellrowborder" valign="top" width="7.329267073292671%" headers="mcps1.1.6.1.4 "><p id="p18465221125911"><a name="p18465221125911"></a><a name="p18465221125911"></a>No</p>
</td>
<td class="cellrowborder" valign="top" width="41.21587841215879%" headers="mcps1.1.6.1.5 "><p id="p146532175915"><a name="p146532175915"></a><a name="p146532175915"></a>Display mode when the content exceeds the container size. Available values are as follows:</p>
<a name="ul531213221202"></a><a name="ul531213221202"></a><ul id="ul531213221202"><li><strong id="b420312341347"><a name="b420312341347"></a><a name="b420312341347"></a>visible</strong>: Displays the extra content outside the container.</li><li><strong id="b648994483617"><a name="b648994483617"></a><a name="b648994483617"></a>hidden</strong>: Truncates the extra content.</li><li><strong id="b320136134115"><a name="b320136134115"></a><a name="b320136134115"></a>scroll</strong>: Scrolls the content vertically, with a scrollbar provided.</li></ul>
<div class="note" id="note1571135818019"><a name="note1571135818019"></a><a name="note1571135818019"></a><span class="notetitle"> NOTE: </span><div class="notebody"><a name="ul8327981218"></a><a name="ul8327981218"></a><ul id="ul8327981218"><li><strong id="b559885611111"><a name="b559885611111"></a><a name="b559885611111"></a>overflow</strong> works for elements whose size is fixed.</li></ul>
</div></div>
</td>
</tr>
<tr id="row83713507010"><td class="cellrowborder" valign="top" width="21.18788121187881%" headers="mcps1.1.6.1.1 "><p id="p2037105016016"><a name="p2037105016016"></a><a name="p2037105016016"></a>align-items<sup id="sup1453123611119"><a name="sup1453123611119"></a><a name="sup1453123611119"></a>6+</sup></p>
</td>
<td class="cellrowborder" valign="top" width="16.648335166483353%" headers="mcps1.1.6.1.2 "><p id="p183721550309"><a name="p183721550309"></a><a name="p183721550309"></a>string</p>
</td>
<td class="cellrowborder" valign="top" width="13.618638136186382%" headers="mcps1.1.6.1.3 "><p id="p5372165019019"><a name="p5372165019019"></a><a name="p5372165019019"></a>-</p>
</td>
<td class="cellrowborder" valign="top" width="7.329267073292671%" headers="mcps1.1.6.1.4 "><p id="p93721501701"><a name="p93721501701"></a><a name="p93721501701"></a>No</p>
</td>
<td class="cellrowborder" valign="top" width="41.21587841215879%" headers="mcps1.1.6.1.5 "><p id="p17372155018015"><a name="p17372155018015"></a><a name="p17372155018015"></a>How items are aligned along the cross axis in a flex container. Available values are as follows:</p>
<a name="ul7910135512514"></a><a name="ul7910135512514"></a><ul id="ul7910135512514"><li><strong id="b11631827184414"><a name="b11631827184414"></a><a name="b11631827184414"></a>stretch</strong>: Items are stretched to the same height or width as the container in the cross axis direction.</li><li><strong id="b4742287552"><a name="b4742287552"></a><a name="b4742287552"></a>flex-start</strong>: Items are aligned to the start of the cross axis.</li><li><strong id="b17873175319556"><a name="b17873175319556"></a><a name="b17873175319556"></a>flex-end</strong>: Items are aligned to the end of the cross axis.</li><li><strong id="b10117111010566"><a name="b10117111010566"></a><a name="b10117111010566"></a>center</strong>: Items are aligned in the middle of the cross axis.</li><li><strong id="b122386256568"><a name="b122386256568"></a><a name="b122386256568"></a>baseline</strong>: In a vertical layout, items are aligned to the start of the cross axis, which means that this value is equivalent of <strong id="b15990123312581"><a name="b15990123312581"></a><a name="b15990123312581"></a>flex-start</strong>. In a horizontal layout, items are aligned with the text baseline if there is text involved, and aligned to the bottom otherwise.</li></ul>
</td>
</tr>
<tr id="row1629945313212"><td class="cellrowborder" valign="top" width="21.18788121187881%" headers="mcps1.1.6.1.1 "><p id="p829911534213"><a name="p829911534213"></a><a name="p829911534213"></a>scrollbar-color<sup id="sup843916381239"><a name="sup843916381239"></a><a name="sup843916381239"></a>6+</sup></p>
</td>
<td class="cellrowborder" valign="top" width="16.648335166483353%" headers="mcps1.1.6.1.2 "><p id="p122991553112113"><a name="p122991553112113"></a><a name="p122991553112113"></a>&lt;color&gt;</p>
</td>
<td class="cellrowborder" valign="top" width="13.618638136186382%" headers="mcps1.1.6.1.3 "><p id="p17299253132120"><a name="p17299253132120"></a><a name="p17299253132120"></a>-</p>
</td>
<td class="cellrowborder" valign="top" width="7.329267073292671%" headers="mcps1.1.6.1.4 "><p id="p9299135342110"><a name="p9299135342110"></a><a name="p9299135342110"></a>No</p>
</td>
<td class="cellrowborder" valign="top" width="41.21587841215879%" headers="mcps1.1.6.1.5 "><p id="p14300165317215"><a name="p14300165317215"></a><a name="p14300165317215"></a>Color of the scrollbar.</p>
</td>
</tr>
<tr id="row17334859142112"><td class="cellrowborder" valign="top" width="21.18788121187881%" headers="mcps1.1.6.1.1 "><p id="p1433575912212"><a name="p1433575912212"></a><a name="p1433575912212"></a>scrollbar-width<sup id="sup10700174022317"><a name="sup10700174022317"></a><a name="sup10700174022317"></a>6+</sup></p>
</td>
<td class="cellrowborder" valign="top" width="16.648335166483353%" headers="mcps1.1.6.1.2 "><p id="p3335165919217"><a name="p3335165919217"></a><a name="p3335165919217"></a>&lt;length&gt;</p>
</td>
<td class="cellrowborder" valign="top" width="13.618638136186382%" headers="mcps1.1.6.1.3 "><p id="p6335175914219"><a name="p6335175914219"></a><a name="p6335175914219"></a>-</p>
</td>
<td class="cellrowborder" valign="top" width="7.329267073292671%" headers="mcps1.1.6.1.4 "><p id="p13335759172115"><a name="p13335759172115"></a><a name="p13335759172115"></a>No</p>
</td>
<td class="cellrowborder" valign="top" width="41.21587841215879%" headers="mcps1.1.6.1.5 "><p id="p533510595217"><a name="p533510595217"></a><a name="p533510595217"></a>Width of the scrollbar.</p>
</td>
</tr>
<tr id="row103571044227"><td class="cellrowborder" valign="top" width="21.18788121187881%" headers="mcps1.1.6.1.1 "><p id="p23581146229"><a name="p23581146229"></a><a name="p23581146229"></a>overscroll-effect<sup id="sup8319241142311"><a name="sup8319241142311"></a><a name="sup8319241142311"></a>6+</sup></p>
</td>
<td class="cellrowborder" valign="top" width="16.648335166483353%" headers="mcps1.1.6.1.2 "><p id="p17358204182217"><a name="p17358204182217"></a><a name="p17358204182217"></a>string</p>
</td>
<td class="cellrowborder" valign="top" width="13.618638136186382%" headers="mcps1.1.6.1.3 "><p id="p4358124122211"><a name="p4358124122211"></a><a name="p4358124122211"></a>-</p>
</td>
<td class="cellrowborder" valign="top" width="7.329267073292671%" headers="mcps1.1.6.1.4 "><p id="p1835816422213"><a name="p1835816422213"></a><a name="p1835816422213"></a>No</p>
</td>
<td class="cellrowborder" valign="top" width="41.21587841215879%" headers="mcps1.1.6.1.5 "><p id="p153581140221"><a name="p153581140221"></a><a name="p153581140221"></a>Scrolling edge effect. Available values are as follows:</p>
<a name="ul2660123592519"></a><a name="ul2660123592519"></a><ul id="ul2660123592519"><li><strong id="b1881111011411"><a name="b1881111011411"></a><a name="b1881111011411"></a>spring</strong>: Similar to the physical dynamic effect of a spring. After scrolling to the edge, you can continue to scroll for a distance based on the initial speed or by touching the knob of the scrollbar. After you release your hand, the knob is rebounded.</li><li><strong id="b11178953147"><a name="b11178953147"></a><a name="b11178953147"></a>fade</strong>: Similar to the physical dynamic effect of fade. When you scroll to the edge, a wave shape fades. The fade changes according to the speed and scrolling distance.</li><li><strong id="b42622051181418"><a name="b42622051181418"></a><a name="b42622051181418"></a>none</strong>: No effect after the scroll bar is moved to the edge.</li></ul>
</td>
</tr>
</tbody>
</table>
## Events<a name="section77341431152917"></a>
In addition to the events in [Universal Events](js-components-common-events.md), the following events are supported.
<a name="tf7a840896dc848b5ab17a18b50036601"></a>
<table><thead align="left"><tr id="rf3d0da15d2f64cd492dfa1e7d98890a5"><th class="cellrowborder" valign="top" width="16.18%" id="mcps1.1.4.1.1"><p id="a487aa1c493e84ca68567b4b65051674d"><a name="a487aa1c493e84ca68567b4b65051674d"></a><a name="a487aa1c493e84ca68567b4b65051674d"></a>Name</p>
</th>
<th class="cellrowborder" valign="top" width="21.89%" id="mcps1.1.4.1.2"><p id="adc4b506cda3043508da6ee7649c12ca4"><a name="adc4b506cda3043508da6ee7649c12ca4"></a><a name="adc4b506cda3043508da6ee7649c12ca4"></a>Parameters</p>
</th>
<th class="cellrowborder" valign="top" width="61.92999999999999%" id="mcps1.1.4.1.3"><p id="a59e4cbe58a5c42a7a4585bc8365783bc"><a name="a59e4cbe58a5c42a7a4585bc8365783bc"></a><a name="a59e4cbe58a5c42a7a4585bc8365783bc"></a>Description</p>
</th>
</tr>
</thead>
<tbody><tr id="row19193181433116"><td class="cellrowborder" valign="top" width="16.18%" headers="mcps1.1.4.1.1 "><p id="p919321419315"><a name="p919321419315"></a><a name="p919321419315"></a>reachstart<sup id="sup18542427173112"><a name="sup18542427173112"></a><a name="sup18542427173112"></a>6+</sup></p>
</td>
<td class="cellrowborder" valign="top" width="21.89%" headers="mcps1.1.4.1.2 "><p id="p11805161217520"><a name="p11805161217520"></a><a name="p11805161217520"></a>-</p>
</td>
<td class="cellrowborder" valign="top" width="61.92999999999999%" headers="mcps1.1.4.1.3 "><p id="p617863613413"><a name="p617863613413"></a><a name="p617863613413"></a>Triggered when the page scrolls to the beginning. This event is triggered only when <strong id="b1088811149010"><a name="b1088811149010"></a><a name="b1088811149010"></a>flex-direction</strong> is <strong id="b79661241501"><a name="b79661241501"></a><a name="b79661241501"></a>row</strong>.</p>
</td>
</tr>
<tr id="row1812350173410"><td class="cellrowborder" valign="top" width="16.18%" headers="mcps1.1.4.1.1 "><p id="p3812150173411"><a name="p3812150173411"></a><a name="p3812150173411"></a>reachend<sup id="sup1959668163514"><a name="sup1959668163514"></a><a name="sup1959668163514"></a>6+</sup></p>
</td>
<td class="cellrowborder" valign="top" width="21.89%" headers="mcps1.1.4.1.2 "><p id="p173576151454"><a name="p173576151454"></a><a name="p173576151454"></a>-</p>
</td>
<td class="cellrowborder" valign="top" width="61.92999999999999%" headers="mcps1.1.4.1.3 "><p id="p1480216408412"><a name="p1480216408412"></a><a name="p1480216408412"></a>Triggered when the page scrolls to the end. This event is triggered only when <strong id="b1284214010015"><a name="b1284214010015"></a><a name="b1284214010015"></a>flex-direction</strong> is <strong id="b14843124010014"><a name="b14843124010014"></a><a name="b14843124010014"></a>row</strong>.</p>
</td>
</tr>
<tr id="row177991024193516"><td class="cellrowborder" valign="top" width="16.18%" headers="mcps1.1.4.1.1 "><p id="p1799132411359"><a name="p1799132411359"></a><a name="p1799132411359"></a>reachtop<sup id="sup126311239153512"><a name="sup126311239153512"></a><a name="sup126311239153512"></a>6+</sup></p>
</td>
<td class="cellrowborder" valign="top" width="21.89%" headers="mcps1.1.4.1.2 "><p id="p93757171511"><a name="p93757171511"></a><a name="p93757171511"></a>-</p>
</td>
<td class="cellrowborder" valign="top" width="61.92999999999999%" headers="mcps1.1.4.1.3 "><p id="p1841194517415"><a name="p1841194517415"></a><a name="p1841194517415"></a>Triggered when the page scrolls to the top. This event is triggered only when <strong id="b2338124611015"><a name="b2338124611015"></a><a name="b2338124611015"></a>flex-direction</strong> is <strong id="b16345194616011"><a name="b16345194616011"></a><a name="b16345194616011"></a>column</strong>.</p>
</td>
</tr>
<tr id="row2849452153619"><td class="cellrowborder" valign="top" width="16.18%" headers="mcps1.1.4.1.1 "><p id="p11850135219366"><a name="p11850135219366"></a><a name="p11850135219366"></a>reachbottom<sup id="sup66531160375"><a name="sup66531160375"></a><a name="sup66531160375"></a>6+</sup></p>
</td>
<td class="cellrowborder" valign="top" width="21.89%" headers="mcps1.1.4.1.2 "><p id="p798910191353"><a name="p798910191353"></a><a name="p798910191353"></a>-</p>
</td>
<td class="cellrowborder" valign="top" width="61.92999999999999%" headers="mcps1.1.4.1.3 "><p id="p1885010522361"><a name="p1885010522361"></a><a name="p1885010522361"></a>Triggered when the page scrolls to the bottom. This event is triggered only when <strong id="b1437611571905"><a name="b1437611571905"></a><a name="b1437611571905"></a>flex-direction</strong> is <strong id="b4377195716016"><a name="b4377195716016"></a><a name="b4377195716016"></a>column</strong>.</p>
</td>
</tr>
</tbody>
</table>
## Methods<a name="section2279124532420"></a>
In addition to the methods in [Universal Methods](js-components-common-methods.md), the following events are supported.
<a name="table20753173210251"></a>
<table><thead align="left"><tr id="row575363214257"><th class="cellrowborder" valign="top" width="17.07%" id="mcps1.1.5.1.1"><p id="p157531032112517"><a name="p157531032112517"></a><a name="p157531032112517"></a>Name</p>
</th>
<th class="cellrowborder" valign="top" width="11.84%" id="mcps1.1.5.1.2"><p id="p77531632132518"><a name="p77531632132518"></a><a name="p77531632132518"></a>Parameters</p>
</th>
<th class="cellrowborder" valign="top" width="13.66%" id="mcps1.1.5.1.3"><p id="p817515404414"><a name="p817515404414"></a><a name="p817515404414"></a>Return values</p>
</th>
<th class="cellrowborder" valign="top" width="57.43000000000001%" id="mcps1.1.5.1.4"><p id="p147531232132512"><a name="p147531232132512"></a><a name="p147531232132512"></a>Description</p>
</th>
</tr>
</thead>
<tbody><tr id="row15753113210251"><td class="cellrowborder" valign="top" width="17.07%" headers="mcps1.1.5.1.1 "><p id="p2314135812511"><a name="p2314135812511"></a><a name="p2314135812511"></a>getScrollOffset<sup id="sup663342216185"><a name="sup663342216185"></a><a name="sup663342216185"></a>6+</sup></p>
</td>
<td class="cellrowborder" valign="top" width="11.84%" headers="mcps1.1.5.1.2 "><p id="p7314115819256"><a name="p7314115819256"></a><a name="p7314115819256"></a>-</p>
</td>
<td class="cellrowborder" valign="top" width="13.66%" headers="mcps1.1.5.1.3 "><p id="p2017514401045"><a name="p2017514401045"></a><a name="p2017514401045"></a><a href="#table154011838131719">ScrollOffset</a></p>
</td>
<td class="cellrowborder" valign="top" width="57.43000000000001%" headers="mcps1.1.5.1.4 "><p id="p0314958162512"><a name="p0314958162512"></a><a name="p0314958162512"></a>Obtains the scrolling offset of the element content.</p>
<div class="note" id="note18321919610"><a name="note18321919610"></a><a name="note18321919610"></a><span class="notetitle"> NOTE: </span><div class="notebody"><a name="ul873964691316"></a><a name="ul873964691316"></a><ul id="ul873964691316"><li>To use this method, <strong id="b711552521"><a name="b711552521"></a><a name="b711552521"></a>overflow</strong> must be set to <strong id="b13595202212"><a name="b13595202212"></a><a name="b13595202212"></a>scroll</strong>. By default, the scrolling direction is the same as the container layout direction.</li></ul>
</div></div>
</td>
</tr>
<tr id="row393410526251"><td class="cellrowborder" valign="top" width="17.07%" headers="mcps1.1.5.1.1 "><p id="p6171185561413"><a name="p6171185561413"></a><a name="p6171185561413"></a>scrollBy<sup id="sup188191223181818"><a name="sup188191223181818"></a><a name="sup188191223181818"></a>6+</sup></p>
</td>
<td class="cellrowborder" valign="top" width="11.84%" headers="mcps1.1.5.1.2 "><p id="p1231455814253"><a name="p1231455814253"></a><a name="p1231455814253"></a><a href="#table1139175871819">ScrollParam</a></p>
</td>
<td class="cellrowborder" valign="top" width="13.66%" headers="mcps1.1.5.1.3 "><p id="p121756404410"><a name="p121756404410"></a><a name="p121756404410"></a>-</p>
</td>
<td class="cellrowborder" valign="top" width="57.43000000000001%" headers="mcps1.1.5.1.4 "><p id="p10314105842512"><a name="p10314105842512"></a><a name="p10314105842512"></a>Indicates the scrolling offset of the element content.</p>
<div class="note" id="note3227027181713"><a name="note3227027181713"></a><a name="note3227027181713"></a><span class="notetitle"> NOTE: </span><div class="notebody"><a name="ul11227027181717"></a><a name="ul11227027181717"></a><ul id="ul11227027181717"><li>To use this method, <strong id="b516712319210"><a name="b516712319210"></a><a name="b516712319210"></a>overflow</strong> must be set to <strong id="b101751823523"><a name="b101751823523"></a><a name="b101751823523"></a>scroll</strong>.</li></ul>
</div></div>
</td>
</tr>
</tbody>
</table>
**Table 1** ScrollOffset<sup>6+</sup>
<a name="table154011838131719"></a>
<table><thead align="left"><tr id="row154011938191717"><th class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.2.4.1.1"><p id="p0401153814174"><a name="p0401153814174"></a><a name="p0401153814174"></a>Name</p>
</th>
<th class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.2.4.1.2"><p id="p19401038111719"><a name="p19401038111719"></a><a name="p19401038111719"></a>Type</p>
</th>
<th class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.2.4.1.3"><p id="p104011438181716"><a name="p104011438181716"></a><a name="p104011438181716"></a>Description</p>
</th>
</tr>
</thead>
<tbody><tr id="row6401133811715"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.2.4.1.1 "><p id="p0401153816171"><a name="p0401153816171"></a><a name="p0401153816171"></a>x</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.2.4.1.2 "><p id="p17401183819172"><a name="p17401183819172"></a><a name="p17401183819172"></a>number</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.2.4.1.3 "><p id="p1840123811176"><a name="p1840123811176"></a><a name="p1840123811176"></a>Offset in the x-axis direction, in px.</p>
</td>
</tr>
<tr id="row540103815174"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.2.4.1.1 "><p id="p1240133811713"><a name="p1240133811713"></a><a name="p1240133811713"></a>y</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.2.4.1.2 "><p id="p4402153816174"><a name="p4402153816174"></a><a name="p4402153816174"></a>number</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.2.4.1.3 "><p id="p94021838121713"><a name="p94021838121713"></a><a name="p94021838121713"></a>Offset in the y-axis direction, in px.</p>
</td>
</tr>
</tbody>
</table>
**Table 2** ScrollParam<sup>6+</sup>
<a name="table1139175871819"></a>
<table><thead align="left"><tr id="row161391758201815"><th class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.2.4.1.1"><p id="p161396585187"><a name="p161396585187"></a><a name="p161396585187"></a>Name</p>
</th>
<th class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.2.4.1.2"><p id="p613975815186"><a name="p613975815186"></a><a name="p613975815186"></a>Type</p>
</th>
<th class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.2.4.1.3"><p id="p18140145861817"><a name="p18140145861817"></a><a name="p18140145861817"></a>Description</p>
</th>
</tr>
</thead>
<tbody><tr id="row41401258181817"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.2.4.1.1 "><p id="p1140858101811"><a name="p1140858101811"></a><a name="p1140858101811"></a>dx</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.2.4.1.2 "><p id="p1014085831819"><a name="p1014085831819"></a><a name="p1014085831819"></a>number</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.2.4.1.3 "><p id="p8140458111815"><a name="p8140458111815"></a><a name="p8140458111815"></a>Offset for scrolling the list in the horizontal direction, in px.</p>
</td>
</tr>
<tr id="row101401584185"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.2.4.1.1 "><p id="p1314055819184"><a name="p1314055819184"></a><a name="p1314055819184"></a>dy</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.2.4.1.2 "><p id="p614035881816"><a name="p614035881816"></a><a name="p614035881816"></a>number</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.2.4.1.3 "><p id="p214075831810"><a name="p214075831810"></a><a name="p214075831810"></a>Offset for scrolling the list in the vertical direction, in px.</p>
</td>
</tr>
<tr id="row1414025811820"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.2.4.1.1 "><p id="p814014580180"><a name="p814014580180"></a><a name="p814014580180"></a>smooth</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.2.4.1.2 "><p id="p17140155818186"><a name="p17140155818186"></a><a name="p17140155818186"></a>boolean</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.2.4.1.3 "><p id="p21401584187"><a name="p21401584187"></a><a name="p21401584187"></a>Whether to perform smooth processing.</p>
</td>
</tr>
</tbody>
</table>
## Example<a name="section1241545010391"></a>
1. Flex style
```
<!-- xxx.hml -->
<div class="container">
<div class="flex-box">
<div class="flex-item color-primary"></div>
<div class="flex-item color-warning"></div>
<div class="flex-item color-success"></div>
</div>
</div>
```
```
/* xxx.css */
.container {
flex-direction: column;
justify-content: center;
align-items: center;
width: 454px;
height: 454px;
}
.flex-box {
justify-content: space-around;
align-items: center;
width: 400px;
height: 140px;
background-color: #ffffff;
}
.flex-item {
width: 120px;
height: 120px;
border-radius: 16px;
}
.color-primary {
background-color: #007dff;
}
.color-warning {
background-color: #ff7500;
}
.color-success {
background-color: #41ba41;
}
```
![](figures/en-us_image_0000001127285076.png)
2. Flex wrap style
```
<!-- xxx.hml -->
<div class="container">
<div class="flex-box">
<div class="flex-item color-primary"></div>
<div class="flex-item color-warning"></div>
<div class="flex-item color-success"></div>
</div>
</div>
```
```
/* xxx.css */
.container {
flex-direction: column;
justify-content: center;
align-items: center;
width: 454px;
height: 454px;
}
.flex-box {
justify-content: space-around;
align-items: center;
flex-wrap: wrap;
width: 300px;
height: 250px;
background-color: #ffffff;
}
.flex-item {
width: 120px;
height: 120px;
border-radius: 16px;
}
.color-primary {
background-color: #007dff;
}
.color-warning {
background-color: #ff7500;
}
.color-success {
background-color: #41ba41;
}
```
![](figures/22.png)
3. Grid style
```
<!-- xxx.hml -->
<div class="common grid-parent">
<div class="grid-child grid-left-top"></div>
<div class="grid-child grid-left-bottom"></div>
<div class="grid-child grid-right-top"></div>
<div class="grid-child grid-right-bottom"></div>
</div>
```
```
/* xxx.css */
.common {
width: 400px;
height: 400px;
background-color: #ffffff;
align-items: center;
justify-content: center;
margin: 24px;
}
.grid-parent {
display: grid;
grid-template-columns: 35% 35%;
grid-columns-gap: 24px;
grid-rows-gap: 24px;
grid-template-rows: 35% 35%;
}
.grid-child {
width: 100%;
height: 100%;
border-radius: 8px;
}
.grid-left-top {
grid-row-start: 0;
grid-column-start: 0;
grid-row-end: 0;
grid-column-end: 0;
background-color: #3f56ea;
}
.grid-left-bottom {
grid-row-start: 1;
grid-column-start: 0;
grid-row-end: 1;
grid-column-end: 0;
background-color: #00aaee;
}
.grid-right-top {
grid-row-start: 0;
grid-column-start: 1;
grid-row-end: 0;
grid-column-end: 1;
background-color: #00bfc9;
}
.grid-right-bottom {
grid-row-start: 1;
grid-column-start: 1;
grid-row-end: 1;
grid-column-end: 1;
background-color: #47cc47;
}
```
![](figures/11.png)
4. Dragging<sup>7+</sup>
```
<!-- xxx.hml -->
<div class="container">
<div class="content" ondragstart="dragstart" ondrag="drag" ondragend="dragend" style="position: absolute;left: {{left}};top:{{top}};">
</div>
</div>
```
```
/* xxx.css */
.container {
flex-direction: column;
}
.content{
width: 200px;
height: 200px;
background-color: red;
}
```
```
// xxx.js
import prompt from '@system.prompt';
export default {
data:{
left:0,
top:0,
},
dragstart(e){
prompt.showToast({
message: 'Start to be dragged'
})
},
drag(e){
this.left = e.globalX;
this.top = e.globalY;
},
dragend(e){
prompt.showToast({
message: 'End Drag'
})
},
}
```
![](figures/9.gif)
```
<!-- xxx.hml -->
<div class="container">
<div class="content" ondrag="drag" style="position: absolute;left: {{left}};top: {{top}};"></div>
<div style="width: 500px; height: 500px; background-color: yellow; position: fixed; left: 15%; top: 30%; opacity:0.3"
ondragenter="dragenter" ondragover="dragover" ondragleave="dragleave" ondrop="drop">
</div>
</div>
```
```
/* xxx.css */
.container {
flex-direction: column;
width: 100%;
position: relative;
max-width: 100%;
}
.content{
width: 200px;
height: 200px;
background-color: red;
position: absolute;
}
```
```
// xxx.js
import prompt from '@system.prompt';
export default {
data:{
left:0,
top:0,
},
drag(e){
this.left = e.globalX;
this.top = e.globalY;
},
dragenter(e){
prompt.showToast({
message: 'enter'
})
},
dragover(e){
prompt.showToast({
message: 'over'
})
},
dragleave(e){
prompt.showToast({
message: 'leave'
})
},
drop(e){
prompt.showToast({
message: 'drop'
})
}
}
```
![](figures/6.gif)
5. Pinching<sup>7+</sup>
```
<!-- xxx.hml -->
<div class="container">
<div class="content "onpinchstart="pinchstart" onpinchend="pinchend" onpinchupdate="pinchupdate"
onpinchcancel=" pinchcancel">
</div>
</div>
```
```
/* xxx.css */
.container {
flex-direction: column;
justify-content: center;
align-items: center;
width: 454px;
height: 454px;}
.content{
width: 400px;
height: 400px;
background-color: aqua;
margin:30px
}
```
```
// xxx.js
import prompt from '@system.prompt';
export default {
pinchstart(e){
prompt.showToast({
message: 'pinchstart!!!'
})
},
pinchupdate(e){
prompt.showToast({
message: 'Two-finger pinch update'
})
},
pinchend(e){
prompt.showToast({
message: 'Finished with two fingers pinching'
})
},
pinchcancel(e){
prompt.showToast({
message: 'Finger pinching is interrupted'
})
}
}
```
Supported
![](figures/5.gif)
## Attributes
The [universal attributes](../arkui-js/js-components-common-attributes.md) are supported.
## Styles
In addition to the [universal styles](../arkui-js/js-components-common-styles.md), the following styles are supported.
| Name | Type | Default Value | Mandatory | Description |
| ------------------------------ | -------------- | ------------ | ---- | ---------------------------------------- |
| flex-direction | string | row | No | Main axis direction of the flex container, which defines how items are placed in the container. Available values are as follows:<br>- **column**: Items are placed vertically from top to bottom.<br>- **row**: Items are placed horizontally from left to right.|
| flex-wrap | string | nowrap | No | Whether items in the flex container are displayed in a single line or multiple lines. The value cannot be dynamically updated. Available values are as follows:<br>- **nowrap**: Items are displayed on a single axis.<br>- **wrap**: Items are displayed on multiple axes.|
| justify-content | string | flex-start | No | How items are aligned along the main axis of the flex container. Available values are as follows:<br>- **flex-start**: Items are packed towards the start row.<br>- **flex-end**: Items are packed towards the end row.<br>- **center**: Items are centered along the row.<br>- **space-between**: Items are positioned with space between the rows.<br>- **space-around**: Items are positioned with space before, between, and after the rows.<br>- **space-evenly**<sup>5+</sup>: Items are arranged with even space between each two.|
| align-items | string | stretch<br>| No | How items are aligned along the cross axis of the flex container. Available values are as follows:<br>- **stretch**: Items are stretched to the same height or width as the container in the cross axis direction.<br>- **flex-start**: Items are aligned to the start of the cross axis.<br>- **flex-end**: Items are aligned to the end of the cross axis.<br>- **center**: Items are aligned in the center of the cross axis.|
| align-content | string | flex-start | No | Multi-row alignment mode when there is extra space in the cross axis. Available values are as follows:<br>- **flex-start**: All rows are packed towards the start of the cross axis. The start edge of the cross axis of the first row is aligned with the start edge of the cross axis of the container. All subsequent rows are aligned with the previous row.<br>- **flex-end**: All rows are packed towards the end of the cross axis. The end of the cross axis of the last row is aligned with the end of the cross axis of the container. All subsequent rows are aligned with the previous row.<br>- **center**: All rows are packed towards the center of the container. Rows are close to each other and aligned with the center of the container. The spacing between the start edge of the container's cross axis and the first row is equal to the spacing between the end edge of the container's cross axis and the last row.<br>- **space-between**: All rows are evenly distributed in the container. The spacing between two adjacent rows is the same. The start and end edges of the container's cross axis are aligned with the edges of the first and last rows, respectively.<br>- **space-around**: All rows are evenly distributed in the container, and the spacing between two adjacent lines is the same. The spacing between the start edge of the container's cross axis and the first row and that between the end edge and the last row are half of the spacing between two adjacent rows.|
| display | string | flex | No | Type of the view box of the item. The value cannot be dynamically updated. Available values are as follows:<br>- **flex**: flexible layout.<br>- **grid**: grid layout.<br>- **none**: The box is disabled.<br>- **inline-flex**<sup>9+</sup>: layout with the **flex** and **inline-block** effects.|
| grid-template-[columns\|rows] | string | 1 row, 1 column | No | Number of rows and columns in the current grid layout. If this attribute is not set, one row and one column are displayed by default. This attribute is valid only when **display** is set to **grid**.<br>Below are some example values of **grid-template-columns**:<br>- **50px 100px 60px**: There are three columns. The first column is 50 px, the second column is 100 px, and the third column is 60 px.<br>- **1fr 1fr 2fr**: There are three columns, and the width allowed by the parent component is divided into four equal shares. The first column occupies one share, the second column occupies one share, and the third column occupies two shares.<br>- **30% 20% 50%**: There are three columns. The first column occupies 30% of the total width allowed by the parent component, the second column occupies 20%, and the third column occupies 50%.<br>- **repeat (2,100px)**: There are two columns. The first column is 100 px, and the second column is 100 px.<br>- **repeat(auto-fill,100px)**<sup>5+</sup>: Each column is 100 px and repeats to fill the cross axis. The number of columns is calculated based on the column size and the cross axis size.<br>- **auto 1fr 1fr**: There are three columns. The first column is adaptive to the width required by its child components. The remaining space is divided into two equal shares, one share occupied by each of the rest two columns.|
| grid-[columns\|rows]-gap | \<length> | 0 | No | Size of the gap between two consecutive rows or columns in a grid layout. You can also use **grid-gap** to set the same size of the gap between rows and columns. This attribute is valid only when **display** is set to **grid**.|
| grid-row-[start\|end] | number | - | No | Start and end row numbers of the current item in the grid layout. This attribute is valid only when the item's parent component is a **\<div>** container whose **display** style is set to **grid**.|
| grid-column-[start\|end] | number | - | No | Start and end column numbers of the current item in the grid layout. This attribute is valid only when the item's parent component is a **\<div>** container whose **display** style is set to **grid**.|
| grid-auto-flow<sup>5+</sup> | string | - | No | How grid items are laid out automatically. Available values are as follows:<br>- **row**: Elements are filled row by row. When there is no horizontal space in a row, a new row is added.<br>- **column**: Elements are filled column by column. When there is no vertical space in a column, a new column is added.|
| overflow<sup>6+</sup> | string | visible | No | Display mode when the content exceeds the container size. Available values are as follows:<br>- **visible**: Displays the extra content outside the container.<br>- **hidden**: Truncates the excess content.<br>- **scroll**: Scrolls the content vertically, with a scrollbar provided.<br>**scroll** works for elements whose size is fixed. By default, the scrolling direction is the same as the container direction.|
| align-items<sup>6+</sup> | string | - | No | How items are aligned along the cross axis in a flex container. Available values are as follows:<br>- **stretch**: Items are stretched to the same height or width as the container in the cross axis direction.<br>- **flex-start**: Items are aligned to the start of the cross axis.<br>- **flex-end**: Items are aligned to the end of the cross axis.<br>- **center**: Items are aligned in the center of the cross axis.<br>- **baseline**: In a vertical layout, items are aligned to the start of the cross axis, which means that this value is equivalent of **flex-start**. In a horizontal layout, items are aligned with the text baseline if there is text involved, and aligned to the bottom otherwise.|
| scrollbar-color<sup>6+</sup> | \<color> | - | No | Color of the scrollbar. |
| scrollbar-width<sup>6+</sup> | \<length> | - | No | Width of the scrollbar. |
| overscroll-effect<sup>6+</sup> | string | - | No | How the scrollbar behaves when it reaches the edge of the scrolling area. Available values are as follows:<br>- **spring**: Similar to the physical dynamic effect of a spring. After scrolling to the edge, you can continue to scroll for a distance based on the initial speed or by touching the knob of the scrollbar. After you release your hand, the knob is rebounded.<br>- **fade**: Similar to the physical dynamic effect of fade. When you scroll to the edge, a wave shape fades. The fade changes according to the speed and scrolling distance.<br>- **none**: No effect after the scroll bar is moved to the edge.|
## Events
In addition to the [universal events](../arkui-js/js-components-common-events.md), the following events are supported.
| Name | Parameter | Description |
| ------------------------ | ---- | ---------------------------------------- |
| reachstart<sup>6+</sup> | - | Triggered when the page scrolls to the beginning. This event is triggered only when **flex-direction** is **row**.|
| reachend<sup>6+</sup> | - | Triggered when the page scrolls to the end. This event is triggered only when **flex-direction** is **row**.|
| reachtop<sup>6+</sup> | - | Triggered when the page scrolls to the top. This event is triggered only when **flex-direction** is **column**.|
| reachbottom<sup>6+</sup> | - | Triggered when the page scrolls to the bottom. This event is triggered only when **flex-direction** is **column**.|
## Methods
In addition to the [universal methods](js-components-common-methods.md), the following methods are supported.
| Name | Name | Return Value | Description |
| ---------------------------- | ----------- | ------------ | --------------------------------------- |
| getScrollOffset<sup>6+</sup> | - | ScrollOffset | Obtains the scrolling offset of the element content.<br>To use this method, **overflow** must be set to **scroll**.|
| scrollBy<sup>6+</sup> | ScrollParam | - | Sets the scrolling offset of the element content.<br>To use this method, **overflow** must be set to **scroll**.|
**Table 1** ScrollOffset<sup>6+</sup>
| Name | Type | Description |
| ---- | ------ | --------------- |
| x | number | Offset in the x-axis direction, in px.|
| y | number | Offset in the y-axis direction, in px.|
**Table 2** ScrollParam<sup>6+</sup>
| Name | Type | Description |
| ------ | ------- | ---------------- |
| dx | number | Offset for scrolling in the horizontal direction, in px.|
| dy | number | Offset for scrolling in the vertical direction, in px.|
| smooth | boolean | Whether to perform smooth processing. |
## Example
1. Flex style
```html
<!-- xxx.hml -->
<div class="container">
<div class="flex-box">
<div class="flex-item color-primary"></div>
<div class="flex-item color-warning"></div>
<div class="flex-item color-success"></div>
</div>
</div>
```
```css
/* xxx.css */
.container {
flex-direction: column;
justify-content: center;
align-items: center;
width: 454px;
height: 454px;
}
.flex-box {
justify-content: space-around;
align-items: center;
width: 400px;
height: 140px;
background-color: #ffffff;
}
.flex-item {
width: 120px;
height: 120px;
border-radius: 16px;
}
.color-primary {
background-color: #007dff;
}
.color-warning {
background-color: #ff7500;
}
.color-success {
background-color: #41ba41;
}
```
![en-us_image_0000001127285076](figures/en-us_image_0000001127285076.png)
2. Flex wrap style
```html
<!-- xxx.hml -->
<div class="container">
<div class="flex-box">
<div class="flex-item color-primary"></div>
<div class="flex-item color-warning"></div>
<div class="flex-item color-success"></div>
</div>
</div>
```
```css
/* xxx.css */
.container {
flex-direction: column;
justify-content: center;
align-items: center;
width: 454px;
height: 454px;
}
.flex-box {
justify-content: space-around;
align-items: center;
flex-wrap: wrap;
width: 300px;
height: 250px;
background-color: #ffffff;
}
.flex-item {
width: 120px;
height: 120px;
border-radius: 16px;
}
.color-primary {
background-color: #007dff;
}
.color-warning {
background-color: #ff7500;
}
.color-success {
background-color: #41ba41;
}
```
![22](figures/22.png)
3. Grid style
```html
<!-- xxx.hml -->
<div class="common grid-parent">
<div class="grid-child grid-left-top"></div>
<div class="grid-child grid-left-bottom"></div>
<div class="grid-child grid-right-top"></div>
<div class="grid-child grid-right-bottom"></div>
</div>
```
```css
/* xxx.css */
.common {
width: 400px;
height: 400px;
background-color: #ffffff;
align-items: center;
justify-content: center;
margin: 24px;
}
.grid-parent {
display: grid;
grid-template-columns: 35% 35%;
grid-columns-gap: 24px;
grid-rows-gap: 24px;
grid-template-rows: 35% 35%;
}
.grid-child {
width: 100%;
height: 100%;
border-radius: 8px;
}
.grid-left-top {
grid-row-start: 0;
grid-column-start: 0;
grid-row-end: 0;
grid-column-end: 0;
background-color: #3f56ea;
}
.grid-left-bottom {
grid-row-start: 1;
grid-column-start: 0;
grid-row-end: 1;
grid-column-end: 0;
background-color: #00aaee;
}
.grid-right-top {
grid-row-start: 0;
grid-column-start: 1;
grid-row-end: 0;
grid-column-end: 1;
background-color: #00bfc9;
}
.grid-right-bottom {
grid-row-start: 1;
grid-column-start: 1;
grid-row-end: 1;
grid-column-end: 1;
background-color: #47cc47;
}
```
![11](figures/11.png)
4. Dragging<sup>7+</sup>
```html
<!-- xxx.hml -->
<div class="container">
<div class="content" ondragstart="dragstart" ondrag="drag" ondragend="dragend" style="position: absolute;left: {{left}};top:{{top}};">
</div>
</div>
```
```css
/* xxx.css */
.container {
flex-direction: column;
}
.content{
width: 200px;
height: 200px;
background-color: red;
}
```
```js
// xxx.js
import prompt from '@system.prompt';
export default {
data:{
left:0,
top:0,
},
dragstart(e){
prompt.showToast({
message: 'Start to be dragged'
})
},
drag(e){
this.left = e.globalX;
this.top = e.globalY;
},
dragend(e){
prompt.showToast({
message: 'End Drag'
})
},
}
```
![9](figures/9.gif)
```html
<!-- xxx.hml -->
<div class="container">
<div class="content" ondrag="drag" style="position: absolute;left: {{left}};top: {{top}};"></div>
<div style="width: 500px; height: 500px; background-color: yellow; position: fixed; left: 15%; top: 30%; opacity:0.3"
ondragenter="dragenter" ondragover="dragover" ondragleave="dragleave" ondrop="drop">
</div>
</div>
```
```css
/* xxx.css */
.container {
flex-direction: column;
width: 100%;
position: relative;
max-width: 100%;
}
.content{
width: 200px;
height: 200px;
background-color: red;
position: absolute;
}
```
```js
// xxx.js
import prompt from '@system.prompt';
export default {
data:{
left:0,
top:0,
},
drag(e){
this.left = e.globalX;
this.top = e.globalY;
},
dragenter(e){
prompt.showToast({
message: 'enter'
})
},
dragover(e){
prompt.showToast({
message: 'over'
})
},
dragleave(e){
prompt.showToast({
message: 'leave'
})
},
drop(e){
prompt.showToast({
message: 'drop'
})
}
}
```
![6](figures/6.gif)
5. Pinching<sup>7+</sup>
```html
<!-- xxx.hml -->
<div class="container">
<div class="content "onpinchstart="pinchstart" onpinchend="pinchend" onpinchupdate="pinchupdate"
onpinchcancel=" pinchcancel">
</div>
</div>
```
```css
/* xxx.css */
.container {
flex-direction: column;
justify-content: center;
align-items: center;
width: 454px;
height: 454px;}
.content{
width: 400px;
height: 400px;
background-color: aqua;
margin:30px
}
```
```js
// xxx.js
import prompt from '@system.prompt';
export default {
pinchstart(e){
prompt.showToast({
message: 'pinchstart!!!'
})
},
pinchupdate(e){
prompt.showToast({
message: 'Two-finger pinch update'
})
},
pinchend(e){
prompt.showToast({
message: 'Finished with two fingers pinching'
})
},
pinchcancel(e){
prompt.showToast({
message: 'Finger pinching is interrupted'
})
}
}
```
![5](figures/5.gif)
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册