|
| 1 | +mobilebone.js |
| 2 | +============= |
| 3 | +单页切换骨架。适用于移动web APP, Hybird混合APP, Phonegap开发, 无兼容要求单页PC应用等。 |
| 4 | + |
| 5 | +实例、测试和文档 |
| 6 | +------------------ |
| 7 | +<ul> |
| 8 | + <li>实例1-仿QQ界面:http://iancj.github.io/qq/</li> |
| 9 | + <li>实例2-暴走漫画制作器:http://baozoumanhua.com/mobile_makers/</li> |
| 10 | +</ul> |
| 11 | + |
| 12 | +<ul> |
| 13 | + <li>测试页面:<a href="http://rawgit.com/zhangxinxu/mobilebone/develop/test/index.html">test/index.html</a></li> |
| 14 | +</ul> |
| 15 | + |
| 16 | +<ul> |
| 17 | + <li>中文文档:<a href="http://rawgit.com/zhangxinxu/mobilebone/develop/docs/index.html">docs/index.html</a></li> |
| 18 | +</ul> |
| 19 | + |
| 20 | +为何需要? |
| 21 | +------------- |
| 22 | +类原生APP的过场体验,适用于这些场景:<br> |
| 23 | +1. Phonegap等类似跨移动开发平台,其静态页面都是index.html, 单页面,因此,需要跟原生一样的过场体验。<br> |
| 24 | +2. Hybird app开发,原生APP内嵌web APP, 为了两者体验一致,不至于交互太唐突,也需要无刷新过场效果。<br> |
| 25 | +3. 就算是纯粹的移动web APP, 使用无刷新模式也不失为一种不错的选型策略。<br> |
| 26 | +4. 对兼容性没有要求的单页PC应用,如类PowerPoint web文档,单页翻屏web站点等。 |
| 27 | + |
| 28 | + |
| 29 | +如何使用? |
| 30 | +--------------- |
| 31 | +引入相关的CSS以及JS, 如下: |
| 32 | +<pre><link rel="stylesheet" href="mobilebone.css"></pre> |
| 33 | +<pre><script src="mobilebone.js"></script></pre> |
| 34 | + |
| 35 | +HTML结构需要有一定的要求: |
| 36 | +<pre>body |
| 37 | + page |
| 38 | + page |
| 39 | + page</pre> |
| 40 | + |
| 41 | +每个page是个满屏元素, 相当于一个独立的页面。 |
| 42 | + |
| 43 | +Mobilebone会自动捕获页面上的a元素,如果其href值存在猫腻,就会触发切换行为。例如: |
| 44 | +<pre><a href="#targetPage">target page</a></pre> |
| 45 | + |
| 46 | +当tap此元素时候,页面会自动无刷新切换到<code>id</code>为<code>targetPage</code>的页面。你可以控制切换的方向,或者使用Ajax获取HTML或JSON, 可以被seajs, requiejs模块化加载(<code>require('mobilebone')</code>),可以和Backbone组合使用等。 |
| 47 | + |
| 48 | +当然,上面介绍的,只是强大功能的冰山一角,更多信息请[参考这里](http://www.zhangxinxu.com/wordpress/?p=4381). |
| 49 | + |
| 50 | +插件 |
| 51 | +---------------- |
| 52 | +<ol> |
| 53 | + <li><strong>mobilebone.ppt.js</strong>: 可以让web页面表现如幻灯片演示,尺寸自适应。 <a href="http://rawgit.com/zhangxinxu/mobilebone/develop/plugins/ppt/index.html">docs/index.html</a>demo点击这里</a>。</li> |
| 54 | +</ol> |
| 55 | + |
| 56 | +优势? |
| 57 | +------------------ |
| 58 | +mobilebone.js只做了一件事情,切换。所以,JS文件很小,gzip后3~4K, 而且很灵活,几乎没有任何UI的限制,适用于各个项目各个场景。同时,巧妙提供各类缓存管理、事件管理的接口,就像是个完整健全的骨架体系,就等你来加血添肉了!<img src="http://mat1.gtimg.com/www/mb/images/face/4.gif" align="absmiddle"> |
| 59 | + |
| 60 | +许可 |
| 61 | +------------------- |
| 62 | +MIT许可 |
| 63 | + |
| 64 | +捐赠 |
| 65 | +------------------ |
| 66 | +<img src="http://www.zhangxinxu.com/alipay.png" width="256" height="256" alt="支付鼓励"> |
| 67 | + |
1 | 68 | mobilebone.js
|
2 | 69 | =============
|
3 | 70 | Single Page Switching bone for mobile web APP, Hybird APP, Phonegap, ...
|
@@ -66,70 +133,5 @@ The MIT License
|
66 | 133 |
|
67 | 134 |
|
68 | 135 |
|
69 |
| -mobilebone.js |
70 |
| -============= |
71 |
| -单页切换骨架。适用于移动web APP, Hybird混合APP, Phonegap开发等。 |
72 |
| - |
73 |
| -实例、测试和文档 |
74 |
| ------------------- |
75 |
| -<ul> |
76 |
| - <li>实例1-仿QQ界面:http://iancj.github.io/qq/</li> |
77 |
| - <li>实例2-暴走漫画制作器:http://baozoumanhua.com/mobile_makers/</li> |
78 |
| -</ul> |
79 |
| - |
80 |
| -<ul> |
81 |
| - <li>测试页面:<a href="http://rawgit.com/zhangxinxu/mobilebone/develop/test/index.html">test/index.html</a></li> |
82 |
| -</ul> |
83 | 136 |
|
84 |
| -<ul> |
85 |
| - <li>中文文档:<a href="http://rawgit.com/zhangxinxu/mobilebone/develop/docs/index.html">docs/index.html</a></li> |
86 |
| -</ul> |
87 |
| - |
88 |
| -为何需要? |
89 |
| -------------- |
90 |
| -类原生APP的过场体验,适用于这些场景:<br> |
91 |
| -1. Phonegap等类似跨移动开发平台,其静态页面都是index.html, 单页面,因此,需要跟原生一样的过场体验。<br> |
92 |
| -2. Hybird app开发,原生APP内嵌web APP, 为了两者体验一致,不至于交互太唐突,也需要无刷新过场效果。<br> |
93 |
| -3. 就算是纯粹的移动web APP, 使用无刷新模式也不失为一种不错的选型策略。 |
94 |
| - |
95 |
| - |
96 |
| -如何使用? |
97 |
| ---------------- |
98 |
| -引入相关的CSS以及JS, 如下: |
99 |
| -<pre><link rel="stylesheet" href="mobilebone.css"></pre> |
100 |
| -<pre><script src="mobilebone.js"></script></pre> |
101 |
| - |
102 |
| -HTML结构需要有一定的要求: |
103 |
| -<pre>body |
104 |
| - page |
105 |
| - page |
106 |
| - page</pre> |
107 |
| - |
108 |
| -每个page是个满屏元素, 相当于一个独立的页面。 |
109 |
| - |
110 |
| -Mobilebone会自动捕获页面上的a元素,如果其href值存在猫腻,就会触发切换行为。例如: |
111 |
| -<pre><a href="#targetPage">target page</a></pre> |
112 |
| - |
113 |
| -当tap此元素时候,页面会自动无刷新切换到<code>id</code>为<code>targetPage</code>的页面。你可以控制切换的方向,或者使用Ajax获取HTML或JSON, 可以被seajs, requiejs模块化加载(<code>require('mobilebone')</code>),可以和Backbone组合使用等。 |
114 |
| - |
115 |
| -更多信息请[参考这里](http://www.zhangxinxu.com/wordpress/?p=4381). |
116 |
| - |
117 |
| -插件 |
118 |
| ----------------- |
119 |
| -<ol> |
120 |
| - <li><strong>mobilebone.ppt.js</strong>: 可以让web页面表现如幻灯片演示,尺寸自适应。 <a href="http://rawgit.com/zhangxinxu/mobilebone/develop/plugins/ppt/index.html">docs/index.html</a>demo点击这里</a>。</li> |
121 |
| -</ol> |
122 |
| - |
123 |
| -优势? |
124 |
| ------------------- |
125 |
| -mobilebone.js只做了一件事情,切换。所以,JS文件很小,gzip后3~4K, 而且很灵活,几乎没有任何UI的限制,适用于各个项目各个场景。 |
126 |
| - |
127 |
| - |
128 |
| -许可 |
129 |
| -------------------- |
130 |
| -MIT许可 |
131 |
| - |
132 |
| -捐赠 |
133 |
| ------------------- |
134 |
| -<img src="http://www.zhangxinxu.com/alipay.png" width="256" height="256" alt="支付鼓励"> |
135 | 137 |
|
0 commit comments