Accordion布局小实例

Accordion布局由类Ext.layout.Accordion定义,名称为accordion,表示可折叠的布局,也就是说使用该布局的容器组件中的子元素是可折叠的形式
<script type="text/javascript">
Ext.onReady(function(){
    new Ext.Panel({
        renderTo:'hello',
        title:'accordion',
        width:300,
        height:200,
        layout:'accordion',
        layoutConfig:{animate:true},  //动画效果
        items:[{
            title:'one',
            html:'this is a one'
            },{
            title:'two',
            html:'this is a two'
            },{
            title:'three',
            html:'this is a three'
            }]
    });
});
    </script>
  </head>
 
  <body>
   
    <div id="hello"></div>
  </body>
</html>

你可能感兴趣的:(html,ext)