需要结合前面一天的内容继续学习(在移动端的页面写法)
也可以是多个页面
<body>
<div data-role="page" data-title="第一页" id="first">
<div data-role="content" id="content">
<a href="#second">按我到第二页</a></div>
.....
</div>
<div data-role="page" data-title="第二页" id="second">
.......
</div>
</body>
apple最先在Safari中使用了<meta name="viewport" content="width=device-width, initial-scale=1">
告诉浏览器移动设备的宽度和高度
用户可以通过平移(Scroll)和缩放(zoom)来浏览整个页面。目前大部分浏览器都支持viewport meta属性
参数还有:height(值为device-height)/initial-scale(初始缩放比例0.25-5)/minimum-scale(允许缩放最小比例0.25-5)/maximum-scale(允许缩放最大比例0.25-5)/user-scalable(允许用户手动缩放0或1或者yes/no)
ch11. jQuery Mobile UI 组件
针对用户界面提供了各种可视化的元素,与HTML5标记一起使用
文本框<input type="text" name="uname" id="uid" value="" />
范围滑块<input type="range" name="rangebar" id="rangebarid" value="25" min="0" max="100" data-highlight="true" />
单选按钮(Radio Button)
<fieldset data-role="controlgroup">
<legend>最喜欢的水果:</legend>
<input type="radio" name="rid" id="rc-1" value="choice-1" checked="checked" /><label for="rc-1">苹果</label>
<input type="radio" name="rid" id="rc-2" value="choice-2" /><label for="rc-2">香蕉</label><input type="radio" name="rid" id="rc-3" value="choice-3" /><label for="rc-3">柠檬</label>
</fieldset>
<fieldset>标记用来创建组,组内各个组件仍然保持自己的功能,样式可以统一
另有check Box的两种写法
<label><input type="checkbox" name="cb-0" checked />I agree</label>
第二种写法
<input type="checkbox" name="cb-0" checked /><label for="cb-0">I agree</label>