1. 模板注释_index.php

<div class="layout grid-s5m0">   // assets文件夹里的stylesheets中的global.css

                                                    .layout { width: 950px; margin: 0 auto; } 

                                                    margin:设置一个元素所有外边距的宽度, 如 margin:10px 5px 15px 20px; 顺序为上,右, 下, 左。

                                                                                                              当有所缺时, 注意对应http://www.w3school.com.cn/css/pr_margin.asp。

                                                                                                         此处: margin:0 auto;表示上下边距为0, 左右则根据宽度自适应。

                                                     .grid-s5m0{width: 750px; overflow: hidden;}   两栏布局

                                                          overflow:  属性规定当内容溢出元素框时发生的事情。

                                                                         scroll时会提供滚动条。

                                                                         hidden 内容会被修剪, 并且其余内容是不可见的。

                                                                                                                


    <div class="col-main">                //.col-main {width: 550px;} 三栏中间 
        <div class="main-wrap J_TRegion">    //.main-wrap {width: 142px}

                                                              // J_TRegin  表示一个区域, 卖家可以在店铺装修添加模块

            <?php

                $main_modules = array(            

                    array('shortname' => 'shop.picRound', 'version' => '1.0-common', domId => "index-01"),
                    array('id' => 'floor', domId => "index-200"), // 自定义模块
                    array('shortname' => 'shop.manualSpread', 'version' => '1.0-wangpu', domId => "index-02"),
                    array('shortname' => 'shop.searchInShop', 'version' => '1.0-common', domId => "index-03"),
                    array('id' => 'floor', domId => "index-201"), // 自定义模块
                    array('shortname' => 'shop.itemRecommend', 'version' => '1.0-wangpu', domId => "index-04"),
                    array('shortname' => 'shop.flashBanner', 'version' => '1.0-common', domId => "index-05"),
                    array('shortname' => 'shop.forumShow', 'version' => '1.0-common', domId => "index-06"),
                    array('id' => 'quick_join', domId => "index-202") // 自定义模块
                );    //定义数组

               echo include_modules('main-modules', $main_modules);    //显示数组, 呈现内容。

               ?>

           </div>
    </div>

    <div class="col-sub J_TRegion">                               // .col-sub{width: 190px} 左侧和三栏190px

        <?php

        $sub_modules = array(
            array('id' => 'side_sales', domId => "index-300"), // 自定义模块
            array('shortname' => 'shop.itemCategory', 'version' => '1.0-common', domId => "index-101"),
            array('shortname' => 'shop.fileList', 'version' => '1.0-common', domId => "index-104"),
            array('shortname' => 'shop.searchInShop', 'version' => '1.0-common', domId => "index-105"),
            array('id' => 'side_help', domId => "index-301"), // 自定义模块
            array('shortname' => 'shop.topList', 'version' => '1.0-common', domId => "index-106"),
            array('shortname' => 'shop.friendLink', 'version' => '1.0-common', domId => "index-107")
        );

        echo include_modules('sub-modules', $sub_modules);    //呈现模块

        ?>

    </div>
</div>

scroll 内容会被修剪,但是浏览器会显示滚动条以便查看其余的内容。
posted @ 2013-08-19 17:23  安心种田  阅读(279)  评论(0编辑  收藏  举报