zoukankan      html  css  js  c++  java
  • sencha touch xtype

    <!doctype html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>Document</title>
        <link rel="stylesheet" href="css/sencha-touch.css">
        <script type="text/javascript" src="lib/sencha-touch-all-debug.js"></script>
    </head>
    <body>
    
        <script type="text/javascript">
            Ext.require("Ext.Carousel");
            Ext.application({
                name:"myApp",
                launch:function(){
                    var panel=Ext.create("Ext.Panel",{
                        defaults:{
                            ui:"dark",
                            flex:1,
                            xtype:"carousel",
                            defaults:{
                                xtype:"panel"
                            }
                        },
                        layout:{
                            type:"vbox",
                            align:"stretch"
                        },
                        items:[
                            {
                                id:"carousel1",
                                direction:"horizontal",
                                items:[
                                    {
                                        html:"Left panel",
                                        style:"background-color:pink"
                                    },
                                    {
                                        html:"Middle panel",
                                        style:"background-color:red"
                                    },
                                    {
                                        html:"Right panel",
                                        style:"background-color:yellow"
                                    }
                                ]
                            },
                            {
                                id:"carousel2",
                                direction:"vertical",
                                items:[
                                    {
                                        html:"Top panel",
                                        style:"background-color:pink"
                                    },
                                    {
                                        html:"Middle panel",
                                        style:"background-color:red"
                                    },
                                    {
                                        html:"Bottom panel",
                                        style:"background-color:yellow"
                                    }
                                ]
                            }
                        ]
                    });
                    Ext.Viewport.add(panel);
                    panel.getComponent("carousel1").setActiveItem(1);
                }
            })
        </script>
    </body>
    </html>
  • 相关阅读:
    请求页面
    获取iframe内的元素
    jquery 判断checkbox是否被选中问题
    bootStrap 模板地址
    content
    基于JS的文本验证
    canvas 移动光速特效-
    Swift 语法
    Xcode 8 Swift 类似插件方法
    js整频滚动展示效果(函数节流鼠标滚轮事件)
  • 原文地址:https://www.cnblogs.com/wangwenfei/p/sencha_touch_2.html
Copyright © 2011-2022 走看看