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