1# stack 2<!--Kit: ArkUI--> 3<!--Subsystem: ArkUI--> 4<!--Owner: @lanshouren--> 5<!--Designer: @lanshouren--> 6<!--Tester: @liuli0427--> 7<!--Adviser: @HelloCrease--> 8 9> **说明:** 10> 从API version 4开始支持。后续版本如有新增内容,则采用上角标单独标记该内容的起始版本。 11 12堆叠容器,子组件按照顺序依次入栈,后一个子组件覆盖前一个子组件。 13 14## 权限列表 15 16无 17 18 19## 子组件 20 21支持。 22 23 24## 属性 25 26支持[通用属性](js-components-common-attributes.md)。 27 28 29## 样式 30 31支持[通用样式](js-components-common-styles.md)。 32 33 34## 事件 35 36支持[通用事件](js-components-common-events.md)。 37 38## 方法 39 40支持[通用方法](js-components-common-methods.md)。 41 42 43## 示例 44 45```html 46<!-- xxx.hml --> 47<stack class="stack-parent"> 48 <div class="back-child bd-radius"></div> 49 <div class="positioned-child bd-radius"></div> 50 <div class="front-child bd-radius"></div> 51</stack> 52``` 53 54```css 55/* xxx.css */ 56.stack-parent { 57 width: 400px; 58 height: 400px; 59 background-color: #ffffff; 60 border-width: 1px; 61 border-style: solid; 62} 63.back-child { 64 width: 300px; 65 height: 300px; 66 background-color: #3f56ea; 67} 68.front-child { 69 width: 100px; 70 height: 100px; 71 background-color: #00bfc9; 72} 73.positioned-child { 74 width: 100px; 75 height: 100px; 76 left: 50px; 77 top: 50px; 78 background-color: #47cc47; 79} 80.bd-radius { 81 border-radius: 16px; 82} 83``` 84 85 86