澳门新葡萄京官网注册,<!

        注意那段CSS代码是需要放入的,不然浏览器会无法正常显示。

<!

DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN”>

<!

DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN”>

<

DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN”>

<

html>

<

html>

<

html>

<

head>

<

head>

<

head>

<

meta http-equiv=”Content-Type” content=”text/html;
charset=ISO-8859-1″>

<

meta http-equiv=”Content-Type” content=”text/html;
charset=ISO-8859-1″>

<

meta http-equiv=”Content-Type” content=”text/html;
charset=ISO-8859-1″>

<

title>Split Container</title>

<

title>Border Container</title>

<

title>Layout</title>

<

style type=”text/css”>

<

style type=”text/css”>

@import “dojo/dijit/themes/tundra/tundra.css”;

style type=”text/css”>

@import “dojo/dijit/themes/soria/soria.css”;

@import “dojo/dojo/resources/dojo.css”

@import “dojo/dijit/themes/tundra/tundra.css”;

@import “dojo/dojo/resources/dojo.css”

</

@import “dojo/dojo/resources/dojo.css”

</

style>

</

style>

<

style>

<

script type=”text/javascript” src=”dojo/dojo/dojo.js”

<

script type=”text/javascript” src=”dojo/dojo/dojo.js”

djConfig=”parseOnLoad: true”>

style type=”text/css”>

djConfig=”parseOnLoad: true”>

</

html,

</

script>

body, #mainDiv {

script>

<

width: 100%; height: 100%;

<

script type=”text/javascript”>

border: 0; padding: 0; margin: 0;

script type=”text/javascript”>

dojo.require(

}

dojo.require(

“dojo.parser”);

</

“dojo.parser”);

dojo.require(

style>

dojo.require(

“dijit.layout.SplitContainer”);

<

“dijit.layout.ContentPane”);

dojo.require(

script type=”text/javascript” src=”dojo/dojo/dojo.js”
djConfig=”parseOnLoad: true”></script>

dojo.require(

“dijit.layout.ContentPane”);

<

“dijit.layout.BorderContainer”);

</

script type=”text/javascript”>

</

script>

dojo.require(

script>

</

“dojo.parser”);

</

head>

dojo.require(

head>

<

“dijit.layout.LayoutContainer”);

<

body class=”tundra”>

dojo.require(

body class=”soria”>

<

“dijit.layout.ContentPane”);

<

div dojoType=”dijit.layout.SplitContainer” orientation=”horizontal”
sizerWidth=”10″ activeSizing=”true” style=”border: 1px solid #bfbfbf;
width: 400px; height: 300px;”>

dojo.require(

div dojoType=”dijit.layout.BorderContainer” design=”headline”>

<div dojoType=”dijit.layout.ContentPane” sizeMin=”20″
sizeShare=”20″>

“dijit.Toolbar”);

<div dojoType=”dijit.layout.ContentPane” region=”top”
style=”background-color:red”>

This is the left part.

dojo.require(

The Dojo Book

</div>

“dijit.layout.SplitContainer”);

</div>

<div dojoType=”dijit.layout.ContentPane” sizeMin=”50″
sizeShare=”80″>

dojo.require(

<div dojoType=”dijit.layout.ContentPane” region=”left”
style=”background-color:lightblue;width:120px”>

This is the right part.

“dijit.layout.AccordionContainer”);

Table of Contents

</div>

</

</div>

</

script>

<div dojoType=”dijit.layout.ContentPane” region=”center”
style=”background-color:yellow”>

div>

</

<ol>

</

head>

<li>This is about Dojo</li>

body>

<

<li>Dojo’s BorderContainer</li>

</

body class=”tundra”>

<li>It’s a wonderful world!</li>

html>
        有几个属性要注意下:

<

</ol>

  1. orientation:
    两个值。”horizontal”将容器分为左右两部分,而”vertical”则分为上下两部分;
  2. sizerWidth: 即中间的分隔条宽度;
  3. activeSizing: 同样两个值。”true”,
    拖动分隔条的时候容器的两部分随着拖动一起动;”false”,拖动结束后,即松开鼠标后,容器中的两部分才改变高度或宽度;
  4. 要给SplitContainer通过style设置width和height。

div dojoType=”dijit.layout.LayoutContainer” id=”mainDiv”>

</div>

        然后是ContentPane的几个属性:

<div dojoType=”dijit.Toolbar”
layoutAlign=”top”>Toolbar</div>

</

  1. sizeMin: 即该ContentPane的最小高度或宽度;
  2. sizeShare:
    相对于其他ContentPane的比例。例如,如果有两个ContentPane,一个该属性是20,另一个是80,那么刚加载好页面显示出来的样子,是一个ContentPane的宽度是另一个的4倍。该属性与像素大小无关,只跟彼此的比例有关系。

<div dojoType=”dijit.layout.SplitContainer” orientation=”horizontal”
layoutAlign=”client”>

div>

<div dojoType=”dijit.layout.AccordionContainer”>

</

<div dojoType=”dijit.layout.AccordionPane”
title=”New”>new</div>

body>

<div dojoType=”dijit.layout.AccordionPane”
title=”Edit”>edit</div>

</

<div dojoType=”dijit.layout.AccordionPane”
title=”Alerts”>alerts</div>

html>

</div>

<div dojoType=”dijit.layout.SplitContainer”
orientation=”vertical”>

<div dojoType=”dijit.layout.ContentPane”
title=”table”>table</div>

<div dojoType=”dijit.layout.ContentPane”
title=”preview”>preview</div>

</div>

</div>

</

div>

</

body>

</

html>