Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/jquery-mobile/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/delphi/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Jquery mobile 如何在页脚中居中放置平面控制组-在jqm 1.1.1中进行了更改?_Jquery Mobile_Center_Footer - Fatal编程技术网

Jquery mobile 如何在页脚中居中放置平面控制组-在jqm 1.1.1中进行了更改?

Jquery mobile 如何在页脚中居中放置平面控制组-在jqm 1.1.1中进行了更改?,jquery-mobile,center,footer,Jquery Mobile,Center,Footer,这在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&

这在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">&copy; 2012 bigco</div>
</div>

&抄袭;2012年bigco

我在这个网站上找到了解决方案:

CSS:

#navgroup {text-align:center;}
#navgroup div {display:inline-block;}
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>

如果使用 $(“选择器”).show(); 显示元素,因为它应用了“显示:块”

不再使用.show(),现在使用
$(“选择器”).css('display','inline block')

现在我使用的是JQM 1.2,这对我很有用

CSS

HTML

。。。
可能align=“center”data role=“controlgroup”div的属性适用于此

<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">&copy; 2012 bigco</div>
</div>

&抄袭;2012年bigco

我不得不暂时将我的控制组更改为带有内容网格的按钮,直到它们解决了jQM 1.1.1中的错误。请参见:
<div data-role="controlgroup" data-type="horizontal" class="center-controlgroup">...</div>
<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">&copy; 2012 bigco</div>
</div>