tj_*_*oll 7 center footer jquery-mobile
这曾经用于将控制组集中在1.1.0中,但现在看起来好像它不在1.1.1中.
<div data-theme="a" data-role="footer" style="text-align:center;">
<div data-role="controlgroup" data-type="horizontal" data-mini="true">
<a href="foo" data-role="button">link1</a>
<a href="boo" data-role="button">link2</a>
</div>
<div class="copy">© 2012 bigco</div>
</div>
Run Code Online (Sandbox Code Playgroud)
gum*_*ins 11
可能是data-role ="controlgroup" div的align ="center"属性可能适合于此.
<div data-theme="a" data-role="footer" align="center">
<div data-role="controlgroup" data-type="horizontal" data-mini="true">
<a href="foo" data-role="button">link1</a>
<a href="boo" data-role="button">link2</a>
</div>
<div class="copy">© 2012 bigco</div>
</div>
Run Code Online (Sandbox Code Playgroud)
我在这个网站上找到了解决方案:http: //forum.jquery.com/topic/how-to-horizontally-center-a-set-of-grouped-buttons
CSS:
#navgroup {text-align:center;}
#navgroup div {display:inline-block;}
Run Code Online (Sandbox Code Playgroud)
HTML:
<div id="navgroup">
<div data-role="controlgroup" data-type="horizontal">
<a href="index.htm" data-role="button" data-theme="e" data-mini="true" class="active menu">Menu</a>
<a href="specials.htm" data-role="button" data-theme="e" data-mini="true" class="specials">Specials</a>
<a href="howitworks.htm" data-role="button" data-theme="e" data-mini="true" class="howitworks">FAQ</a>
<a href="http://www.facebook.com" data-rel="external" data-role="button" data-theme="e" data-mini="true" class="feedback">Facebook</a>
</div>
</div>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
10292 次 |
| 最近记录: |