JavaScript DHTML/Dojo toolkit/LayoutContainer

Материал из Web эксперт
Перейти к: навигация, поиск

Layout control

 
<html>
  <head>
    <link rel="StyleSheet" type="text/css"
      href="js/dojo/dijit/themes/tundra/tundra.css">
    <script type="text/javascript">
      var djConfig = {
        baseScriptUri : "js/dojo/",
        parseOnLoad : true
      };
    </script>
    <script type="text/javascript" src="js/dojo/dojo/dojo.js"></script>
    <script>
      dojo.require("dojo.parser");
      dojo.require("dijit.layout.ContentPane");
      dojo.require("dijit.layout.LayoutContainer");
    </script>
  </head>
  <body class="tundra">
        <div dojoType="dijit.layout.LayoutContainer"
          style="width:800px;height:600px;">
          <div dojoType="dijit.layout.ContentPane" layoutAlign="top"
            style="background-color:#ff0;">Heading</div>
          <div dojoType="dijit.layout.ContentPane" layoutAlign="left"
            style="width:200px;background-color:#0ff;">Side menu</div>
          <div dojoType="dijit.layout.ContentPane" layoutAlign="client"
            style="background-color:#0f0;">Main content</div>
        </div>
  </body>
</html>