欢迎各位兄弟 发布技术文章
这里的技术是共享的
拷贝上面的/css目录、/plugins目录、/ui目录、/appframework.js文件,如下图所示。
如果需要也可以拷贝index.html,然后自己修改,比如上面我的index01.html和index02.html
接下来引入css与js文件
index01.html
1、UI container
(1)每个panel单独的header与footer
(2)公用的header和footer可以在多个panel中调用
- <div id="afui">
- <span style="white-space:pre"> </span><div id="content">
- <span style="white-space:pre"> </span><div id="main" title="Welcome" class="panel" selected="true">
- <span style="white-space:pre"> </span><header>
- <span style="white-space:pre"> </span><h1>Welcome</h1>
- <span style="white-space:pre"> </span><a class="button" style="float:right;" class="icon home"></a>
- <span style="white-space:pre"> </span></header>
- <span style="white-space:pre"> </span>对应页面的内容
- <span style="white-space:pre"> </span><footer>
- <span style="white-space:pre"> </span><a href='#about' class='icon info'>About</a>
- <span style="white-space:pre"> </span></footer>
- <span style="white-space:pre"> </span></div>
- <span style="white-space:pre"> </span></div>
- </div>
(3)另一种方法
- <div id="afui">
- <span style="white-space:pre"> </span><div id="content">
- <span style="white-space:pre"> </span><div id="main" title="Welcome" class="panel" selected="true" data-footer="custom_footer"
- <span style="white-space:pre"> </span>data-header="custom_header">
- <span style="white-space:pre"> </span>对应页面的内容
- <span style="white-space:pre"> </span></div>
- <span style="white-space:pre"> </span><header id="custom_header">
- <span style="white-space:pre"> </span><h1>Welcome</h1>
- <span style="white-space:pre"> </span><a class="button" style="float:right;" class="icon home"></a>
- <span style="white-space:pre"> </span></header>
- <span style="white-space:pre"> </span><footer id="custom_footer">
- <span style="white-space:pre"> </span><a href='#about' class='icon info'>About</a>
- <span style="white-space:pre"> </span></footer>
- <span style="white-space:pre"> </span></div>
- </div>
- <div id="header">
- <!-- any additional HTML you want can go here -->
- <a onclick="$.ui.toggleSideMenu();" class="button">Toggle Side Menu</a>
- </div>
- <div id="content">
- <!-- this is where your panels will go -->
- <div id="main" title="Welcome" class="panel" selected="true">
- 内容
- </div>
- <div id="about" title="About" class="panel" data-nav="second_nav">
- <!-- by setting data-nav the "second_nav" will be shown on this panel -->
- </div>
- </div>
- //底部
- <div id="navbar">
- <a target="#welcome" class="icon home">Home</a>
- </div>
运行效果
来自 http://blog.csdn.net/dawanganban/article/details/18697631