JqueryMobile- 搭建主模板
生活随笔
收集整理的這篇文章主要介紹了
JqueryMobile- 搭建主模板
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
最近公司要開發手機端的,可是我沒學過安卓,然后用HTML5+JQUERYMOBILE也可以做這些手機端的程序,做成個網頁,發到網上,免強也行,于是開始了我JQUERYMOBILE的學習。
先放一下主模板,在建三個DIV,在data-role屬性里依次放header,content,footer,于是主模板就有了,很是EASY!
代碼貼下,備注:
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title></title><meta name="viewport" content="width=device-width, initial-scale=1" /><link href="../assets/lib/mobile/jquery.mobile-1.4.2.css" rel="stylesheet" type="text/css" /> </head> <body><!--data-role屬性就是JQM中控件的概念--><div data-role="page"><div data-role="header" data-position="fixed"><h1>這是標題頭</h1></div><div data-role="content"><a href="02-page2.html" data-transition="slide">Page2</a> <a href="03-page3.html"data-rel="dialog">Page3</a></div><div data-role="footer" data-position="fixed"><h4>Copyright © chunxiao.cn</h4></div></div> </body> </html> <script src="../assets/lib/jquery/jquery-1.11.0.js" type="text/javascript"></script> <script src="../assets/lib/mobile/jquery.mobile-1.4.2.js" type="text/javascript"></script>?
轉載于:https://www.cnblogs.com/cxeye/p/4919660.html
與50位技術專家面對面20年技術見證,附贈技術全景圖總結
以上是生活随笔為你收集整理的JqueryMobile- 搭建主模板的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 计算机网络之数据链路层:15、以太网、适
- 下一篇: (王道408考研数据结构)第七章查找-第