因此可以在jQuery mobile中居中网格。例如,我有http://jsfiddle.net/nonamez/Pr8pa/
<div class="ui-grid-d">
<div class="ui-block-a"><div class="ui-bar ui-bar-e" style="height:60px">A</div></div>
<div class="ui-block-b"><div class="ui-bar ui-bar-e" style="height:60px">B</div></div>
<div class="ui-block-c"><div class="ui-bar ui-bar-e" style="height:60px">C</div></div>
<div class="ui-block-d"><div class="ui-bar ui-bar-e" style="height:60px">C</div></div>
<div class="ui-block-a"><div class="ui-bar ui-bar-e" style="height:60px">A</div></div>
<div class="ui-block-b"><div class="ui-bar ui-bar-e" style="height:60px">B</div></div>
<div class="ui-block-c"><div class="ui-bar ui-bar-e" style="height:60px">C</div></div>
<div class="ui-block-a"><div class="ui-bar ui-bar-e" style="height:60px">A</div></div>
<div class="ui-block-b"><div class="ui-bar ui-bar-e" style="height:60px">B</div></div>
<div class="ui-block-c"><div class="ui-bar ui-bar-e" style="height:60px">C</div></div>
</div>
它看起来像
答案 0 :(得分:1)
工作示例:http://jsfiddle.net/Gajotres/BFfWc/
变化:
<div class="ui-grid-d">
要:
<div class="ui-grid-c">
<div class="ui-grid-c">
<div class="ui-block-a"><div style="height:60px" class="ui-bar ui-bar-e">A</div></div>
<div class="ui-block-b"><div style="height:60px" class="ui-bar ui-bar-e">B</div></div>
<div class="ui-block-c"><div style="height:60px" class="ui-bar ui-bar-e">C</div></div>
<div class="ui-block-d"><div style="height:60px" class="ui-bar ui-bar-e">C</div></div>
<div class="ui-block-a"><div style="height:60px" class="ui-bar ui-bar-e">A</div></div>
<div class="ui-block-b"><div style="height:60px" class="ui-bar ui-bar-e">B</div></div>
<div class="ui-block-c"><div style="height:60px" class="ui-bar ui-bar-e">C</div></div>
<div class="ui-block-a"><div style="height:60px" class="ui-bar ui-bar-e">A</div></div>
<div class="ui-block-b"><div style="height:60px" class="ui-bar ui-bar-e">B</div></div>
<div class="ui-block-c"><div style="height:60px" class="ui-bar ui-bar-e">C</div></div>
</div>