【问题标题】:How to correctly use ui-btn-left and ui-btn-right class in jquery mobile如何在 jquery mobile 中正确使用 ui-btn-left 和 ui-btn-right 类
【发布时间】:2014-04-04 05:31:35
【问题描述】:

如何正确使用 ui-btn-left 和 ui-btn-right 类

这就是我想要的

这就是我得到的

这是我的jsfiddle

我的代码

<div  class="ui-bar ui-bar-b ui-btn-corner-all bar" data-theme="a">
  <div class="ui-btn-left"   >
     <a id="btnlogout" href="javascript:void(0);" data-role="button" class="ui-btn-left btnlogout" data-inline="true" data-theme="a">Disconnect</a>
      <a data-role="button" href="javascript:void(0);"  class="imgInfo ui-btn-right" data-mini="true" data-inline="true" style="width:45px;height:45px;" data-theme="a">   </a>
    </div>
 <div class="ui-btn-right" >
       <a  data-role="button" href="javascript:void(0);" class="imgRefresh" data-mini="true" data-inline="true" style="width:45px;height:45px;" onclick="getunreadmessage();" data-theme="a"></a>
   </div>
</div>

【问题讨论】:

    标签: css jquery-mobile responsive-design css-float


    【解决方案1】:

    我想也许有更好的方法。但是,这是一个快速修复。您可以添加:

    .ui-btn-right {
        float: right;
    }
    
    .ui-btn-left {
        float: left
    }
    

    和&lt;br style="clear: both" /&gt; 在你的&lt;div class="ui-btn-right" &gt; 之后清除浮动

    Updated Fiddle

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-08-30
      • 2012-02-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多