<output id="qn6qe"></output>

    1. <output id="qn6qe"><tt id="qn6qe"></tt></output>
    2. <strike id="qn6qe"></strike>

      亚洲 日本 欧洲 欧美 视频,日韩中文字幕有码av,一本一道av中文字幕无码,国产线播放免费人成视频播放,人妻少妇偷人无码视频,日夜啪啪一区二区三区,国产尤物精品自在拍视频首页,久热这里只有精品12

      ExtJS中layout的12種布局風格

      extjs的容器組件都可以設置它的顯示風格,它的有效值有 absolute, accordion, anchor, border, card, column, fit, form and table.  一共9種。

      另外幾種見:  http://www.sencha.com/deploy/dev/examples/layout-browser/layout-browser.html  里面有詳細的例子。

       

      ·  absolute 顧名思義,在容器內部,根據指定的坐標定位顯示 

      This is a simple layout style that allows you to position items within a container using CSS-style absolute positioning via XY coordinates.

      Sample Config:

      復制代碼
      layout: 'absolute',
      items:[{
          title: 'Panel 1',
          x: 50,
          y: 50,
          html: 'Positioned at x:50, y:50'
      }]
      復制代碼

       

      · accordion 這個是最容易記的,手風琴效果

      Displays one panel at a time in a stacked layout. No special config properties are required other than the layout — all panels added to the container will be converted to accordion panels.

      復制代碼
      <!DOCTYPE html>
      <html>
        <head>
          <title>hello-extjs</title>
          
          <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
          <meta http-equiv="description" content="this is my page">
          <meta http-equiv="content-type" content="text/html; charset=UTF-8">
          
          <!--<link rel="stylesheet" type="text/css" href="./styles.css">-->
          <!-- 引入extjs樣式文件 -->
          <link rel="stylesheet" type="text/css" href="ext-3.4.1/resources/css/ext-all.css" />
          <!-- 引入extjs庫文件,底層驅動 -->
          <script type="text/javascript" src="ext-3.4.1/adapter/ext/ext-base.js"></script>
          <!-- 引入extjs-all -->
          <script type="text/javascript" src="ext-3.4.1/ext-all.js"></script>
          <!-- <script type="text/javascript" src="extjs/ext-lang-zh_CN.js" charset="utf-8"></script> -->
          <script type="text/javascript">
              Ext.onReady(function(){  
                  var panel=new Ext.Panel(//Ext.formPanel 就是Panel中用了form布局  
                        {  
                         renderTo:'paneldiv',  
                         title:'容器組件',  
                         layout:'accordion',         
                         width:500,  
                         height:200,  
                         layoutConfig:{animate:false},  
                         items:[  
                          {title:'元素1',html:''},  
                          {title:'元素2',html:''},  
                          {title:'元素3',html:''},  
                          {title:'元素4',html:''}  
                         ]  
                        }  
                       );  
                  });  
          </script>
        </head>
        
        <body>
          This is my HTML page. <br>
           <div id="paneldiv"></div>
        </body>
      </html>
      復制代碼

      · anchor 這個效果具體還不知道有什么用,就是知道注意一下  
      1.容器內的組件要么指定寬度,要么在anchor中同時指定高/寬,  

      2.anchor值通常只能為負值(指非百分比值),正值沒有意義,  
      3.anchor必須為字符串值

      Provides anchoring of contained items to the container's edges. This type of layout is most commonly seen within FormPanels (or any container with a FormLayout) where fields are sized relative to the container without hard-coding their dimensions.

      In this example, panels are anchored for example purposes so that you can easily see the effect. If you resize the browser window, the anchored panels will automatically resize to maintain the same relative dimensions.

      復制代碼
      <!DOCTYPE html>
      <html>
        <head>
          <title>hello-extjs</title>
          
          <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
          <meta http-equiv="description" content="this is my page">
          <meta http-equiv="content-type" content="text/html; charset=UTF-8">
          
          <!--<link rel="stylesheet" type="text/css" href="./styles.css">-->
          <!-- 引入extjs樣式文件 -->
          <link rel="stylesheet" type="text/css" href="ext-3.4.1/resources/css/ext-all.css" />
          <!-- 引入extjs庫文件,底層驅動 -->
          <script type="text/javascript" src="ext-3.4.1/adapter/ext/ext-base.js"></script>
          <!-- 引入extjs-all -->
          <script type="text/javascript" src="ext-3.4.1/ext-all.js"></script>
          <!-- <script type="text/javascript" src="extjs/ext-lang-zh_CN.js" charset="utf-8"></script> -->
          <script type="text/javascript">
              Ext.onReady(function() {   
              var panel1 = new Ext.Panel({   
                   title: "panel1",  
                   height: 100,   
                  anchor: '-50',    
                  html: "高度等于100,寬度=容器寬度-50"    
              });
              var panel2 = new Ext.Panel({
                   title: "panel2",
                   height: 100,
                   anchor: '50%',   
                   html: "高度等于100,寬度=容器寬度的50%"   
              });      
              var panel3 = new Ext.Panel({   
                  title: "panel3",   
                  anchor: '-10, -250',   
                  html: "寬度=容器寬度-10,高度=容器寬度-250"   
              });       
               var win = new Ext.Window({   
                   title: "Anchor Layout",   
                   height: 400, 
                   width: 400,   
                   plain: true,                       
                   layout: 'anchor',   
                   items: [panel1, panel2,panel3]               
               });   
               win.show();   
                   }); 
          </script>
        </head>
        
        <body>
          This is my HTML page. <br>
           <div id="paneldiv"></div>
        </body>
      </html>
      復制代碼

       

       

      · border 將容器分為五個區域:east,south,west,north,center

      This Layout Browser page is already a border layout, and this example shows a separate border layout nested within a region of the page's border layout. Border layouts can be nested with just about any level of complexity that you might need.

      Every border layout must at least have a center region. All other regions are optional.

      Sample Config:

      復制代碼
      layout:'border',
      defaults: {
          collapsible: true,
          split: true,
          bodyStyle: 'padding:15px'
      },
      items: [{
          title: 'Footer',
          region: 'south',
          height: 150,
          minSize: 75,
          maxSize: 250,
          cmargins: '5 0 0 0'
      },{
          title: 'Navigation',
          region:'west',
          margins: '5 0 0 0',
          cmargins: '5 5 0 0',
          width: 175,
          minSize: 100,
          maxSize: 250
      },{
          title: 'Main Content',
          collapsible: false,
          region:'center',
          margins: '5 0 0 0'
      }]
      復制代碼

       

       

      · card (TabPanel)

      復制代碼
      <!DOCTYPE html>
      <html>
        <head>
          <title>hello-extjs</title>
          
          <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
          <meta http-equiv="description" content="this is my page">
          <meta http-equiv="content-type" content="text/html; charset=UTF-8">
          
          <!--<link rel="stylesheet" type="text/css" href="./styles.css">-->
          <!-- 引入extjs樣式文件 -->
          <link rel="stylesheet" type="text/css" href="ext-3.4.1/resources/css/ext-all.css" />
          <!-- 引入extjs庫文件,底層驅動 -->
          <script type="text/javascript" src="ext-3.4.1/adapter/ext/ext-base.js"></script>
          <!-- 引入extjs-all -->
          <script type="text/javascript" src="ext-3.4.1/ext-all.js"></script>
          <!-- <script type="text/javascript" src="extjs/ext-lang-zh_CN.js" charset="utf-8"></script> -->
          <script type="text/javascript">
              Ext.onReady(function() {        
              var button = Ext.get('show-btn');   
              var win;
               button.on('click', function() {   
                  //創建TabPanel   
                  var tabs = new Ext.TabPanel({   
                       region: 'center', //border 布局,將頁面分成東,南,西,北,中五部分,這里表示TabPanel放在中間   
                       margins: '3 3 3 0',   
                       activeTab: 0,   
                       defaults: {   
                          autoScroll: true   
                       },  
                       items: [{   
                           title: 'Bogus Tab',   
                           html: "第一個Tab的內容."   
                       }, {   
                           title: 'Another Tab',   
                           html: "我是另一個Tab"   
                       }, {   
                           title: 'Closable Tab',   
                           html: "這是一個可以關閉的Tab",   
                           closable: true   
                          }]   
                  });   
         
                       //定義一個Panel   
                      var nav = new Ext.Panel({   
                          title: 'Navigation',   
                           region: 'west', //放在西邊,即左側   
                           split: true,   
                           width: 200,   
                           collapsible: true, //允許伸縮   
                           margins: '3 0 3 3',   
                           cmargins: '3 3 3 3'   
                       });   
          
                       //如果窗口第一次被打開時才創建   
                       if (!win) {   
                           win = new Ext.Window({   
                               title: 'Layout Window',   
                               closable: true,   
                               width: 600,   
                               height: 350,   
                               border : false,   
                               plain: true,   
                               layout: 'border',   
                               closeAction:'hide',   
                               items: [nav, tabs]//把上面創建的panel和TabPanel放在window中,并采用border方式布局   
                           });   
                       }   
                       win.show(button);   
               });   
              });  
          </script>
        </head>
        
        <body>
          This is my HTML page. <br>
           <button id="show-btn">button</button>
        </body>
      </html>
      復制代碼

       

       · card (Wizard)

      You can use a Card layout to create your own custom wizard-style screen. The layout is a standard CardLayout with a Toolbar at the bottom, and the developer must supply the navigation function that implements the wizard's business logic (see the code in basic.js for details).

      Sample Config:

      復制代碼
      layout:'card',
      activeItem: 0, // index or id
      bbar: ['->', {
          id: 'card-prev',
          text: '&laquo; Previous'
      },{
          id: 'card-next',
          text: 'Next &raquo;'
      }],
      items: [{
          id: 'card-0',
          html: 'Step 1'
      },{
          id: 'card-1',
          html: 'Step 2'
      },{
          id: 'card-2',
          html: 'Step 3'
      }]
      復制代碼

       

       
      · column 把整個容器看成一列,然后向容器放入子元素時

      This is a useful layout style when you need multiple columns that can have varying content height. Any fixed-width column widths are calculated first, then any percentage-width columns specified using the columnWidth config will be calculated based on remaining container width. Percentages should add up to 1 (100%) in order to fill the container.

      Sample Config:

      復制代碼
      layout:'column',
      items: [{
          title: 'Width = 25%',
          columnWidth: .25,
          html: 'Content'
      },{
          title: 'Width = 75%',
          columnWidth: .75,
          html: 'Content'
      },{
          title: 'Width = 250px',
          width: 250,
          html: 'Content'
      }]
      復制代碼

       

      · fit 一個子元素將充滿整個容器(如果多個子元素則只有一個元素充滿整個容器)

      A very simple layout that simply fills the container with a single panel. This is usually the best default layout choice when you have no other specific layout requirements.

      Sample Config:

      layout:'fit',
      items: {
          title: 'Fit Panel',
          html: 'Content',
          border: false
      }

       

      ·  form 是一種專門用于管理表單中輸入字段的布局

      復制代碼
      <!DOCTYPE html>
      <html>
        <head>
          <title>hello-extjs</title>
          
          <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
          <meta http-equiv="description" content="this is my page">
          <meta http-equiv="content-type" content="text/html; charset=UTF-8">
          
          <!--<link rel="stylesheet" type="text/css" href="./styles.css">-->
          <!-- 引入extjs樣式文件 -->
          <link rel="stylesheet" type="text/css" href="ext-3.4.1/resources/css/ext-all.css" />
          <!-- 引入extjs庫文件,底層驅動 -->
          <script type="text/javascript" src="ext-3.4.1/adapter/ext/ext-base.js"></script>
          <!-- 引入extjs-all -->
          <script type="text/javascript" src="ext-3.4.1/ext-all.js"></script>
          <!-- <script type="text/javascript" src="extjs/ext-lang-zh_CN.js" charset="utf-8"></script> -->
          <script type="text/javascript">
              Ext.onReady(function() {    
                var win = new Ext.Window({   
                    title: "form Layout",   
                   height: 150,   
                   width: 230,   
                    plain: true,    
                   bodyStyle: 'padding:15px',    
                   items:    
                    {    
                       xtype: "form",   
                       labelWidth: 30,   
                       defaultType: "textfield",    
                       frame:true,   
                       items:    
                       [   
                           {    
                               fieldLabel:"姓名",   
                               name:"username",   
                               allowBlank:false    
                           },   
                           {    
                               fieldLabel:"呢稱",   
                               name:"nickname"    
                           },   
                           {    
                               fieldLabel: "生日",   
                               xtype:'datefield',   
                               name: "birthday",    
                               width:127    
                           }   
                       ]   
                   }   
               });   
               win.show();    
           });   
          </script>
        </head>
        
        <body>
          This is my HTML page. <br>
        </body>
      </html>
      復制代碼

       · table 按照普通表格的方法布局子元素,用layoutConfig:{columns:3},//將父容器分成3列

      復制代碼
      <!DOCTYPE html>
      <html>
        <head>
          <title>hello-extjs</title>
          
          <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
          <meta http-equiv="description" content="this is my page">
          <meta http-equiv="content-type" content="text/html; charset=UTF-8">
          
          <!--<link rel="stylesheet" type="text/css" href="./styles.css">-->
          <!-- 引入extjs樣式文件 -->
          <link rel="stylesheet" type="text/css" href="ext-3.4.1/resources/css/ext-all.css" />
          <!-- 引入extjs庫文件,底層驅動 -->
          <script type="text/javascript" src="ext-3.4.1/adapter/ext/ext-base.js"></script>
          <!-- 引入extjs-all -->
          <script type="text/javascript" src="ext-3.4.1/ext-all.js"></script>
          <!-- <script type="text/javascript" src="extjs/ext-lang-zh_CN.js" charset="utf-8"></script> -->
          <script type="text/javascript">
              Ext.onReady(function(){    
                      var panel=new Ext.Panel(   
                        {   
                         renderTo:'paneldiv',   
                         title:'容器組件',   
                         layout:'table',          
                         width:500,   
                         height:200,   
                         layoutConfig:{columns:3},//將父容器分成3列   
                         items:[   
                          {title:'元素1',html:'ssssssssss',rowspan:2,height:100},   
                         {title:'元素2',html:'dfffsddsdfsdf',colspan:2},   
                          {title:'元素3',html:'sdfsdfsdf'},   
                          {title:'元素4',html:''}   
                            ]   
                        });   
                  }); 
          </script>
        </head>
        
        <body>
          This is my HTML page. <br>
          <div id="paneldiv"><div>
        </body>
      </html>
      復制代碼

      VBox

      A layout that allows for the vertical and horizontal stretching of child items, much like the container layout with size management.

      Sample Config:

      復制代碼
      layout: {
          type: 'vbox'
          align : 'stretch',
          pack  : 'start',
      },
      items: [
          {html:'panel 1', flex:1},
          {html:'panel 2', height:150},
          {html:'panel 3', flex:2}
      ]
      復制代碼

       

      HBox

      A layout that allows for the vertical and horizontal stretching of child items, much like the column layout but can stretch items vertically.

      Sample Config:

      復制代碼
      layout: {
          type: 'hbox',
          pack: 'start',
          align: 'stretch'
      },
      items: [
          {html:'panel 1', flex:1},
          {html:'panel 2', width:150},
          {html:'panel 3', flex:2}
      ]
      復制代碼

      posted @ 2024-07-12 19:44  奔跑de陀螺  閱讀(139)  評論(0)    收藏  舉報
      主站蜘蛛池模板: 韩国 日本 亚洲 国产 不卡| 久久亚洲精品11p| 欧美z0zo人禽交另类视频| 亚洲精品成人片在线观看精品字幕| 国产精品久久毛片| 欧美裸体xxxx极品| 四虎在线永久免费看精品| 亚洲蜜桃av一区二区三区| 久久精品久久电影免费理论片| 加勒比无码人妻东京热| av中文字幕国产精品| 国产精品免费视频网站| 男女啪啪高清无遮挡免费| 91精品人妻中文字幕色| 久久人妻无码一区二区三区av| 日本一区二区精品色超碰| 日本亚洲色大成网站www久久| 亚洲精品成人久久久| 德安县| 天堂а√在线地址中文在线 | 日韩少妇内射免费播放| 一区二区三区av天堂| 国产免费午夜福利在线播放 | 亚洲精品无码久久一线| 波多野结衣av一区二区三区中文| 亚洲 小说区 图片区 都市| 国产成人综合久久亚洲精品| 国产精品人妻在线观看| 青青国产揄拍视频| 少妇伦子伦情品无吗| 国产成人一区二区三区在线观看| 亚洲高潮喷水无码AV电影 | 在线观看人成视频免费| 蜜臀精品国产高清在线观看| 欧美日本在线一区二区三区| 中文字幕日韩区二区三区| 正在播放国产对白孕妇作爱| 久久精品国产99国产精品澳门| 熟女人妻aⅴ一区二区三区电影| 国内精品久久久久影院蜜芽| 国产婷婷精品av在线|