【问题标题】:How do I add white-space:normal in this jQuery Mobile grid button text?如何在这个 jQuery Mobile 网格按钮文本中添加空格:正常?
【发布时间】:2015-05-25 20:27:45
【问题描述】:

这是我的 jQuery Mobile Grid 按钮代码:

<div class="ui-grid-b my-breakpoint">
  <div class="ui-block-a"><button type="button" data-theme="c"> <img src="res/icon/android/business.png" height="45"><br>Business</button></div>
  <div class="ui-block-b"><button type="button" data-theme="c"> <img src="res/icon/android/digital_center.png" height="45"><br>Digital Center</button></div> 
  <div class="ui-block-c"><button type="button" data-theme="c"> <img src="res/icon/android/employment.png" height="45"><br>Employment</button></div>     
</div>

现在我想添加 white-space:normal 来包装按钮文本。如何以及在哪里为上述代码添加white-space:normal

【问题讨论】:

    标签: javascript jquery css jquery-ui jquery-mobile


    【解决方案1】:

    您可以应用 CSS 规则:

    button {  
        white-space: normal !important;
    }
    

    但是按钮高度将不再相等...

    【讨论】:

      猜你喜欢
      • 2015-09-27
      • 2015-02-07
      • 2016-07-16
      • 2013-01-14
      • 1970-01-01
      • 2012-06-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多