我如何添加空白:正常在这个jQuery移动网格按钮文本

How do I add white-space:normal in this jQuery Mobile grid button text?

本文关键字:jQuery 移动 移动网 文本 按钮 网格 何添加 添加 空白      更新时间:2023-09-26

这是我的jQuery移动网格按钮代码:

<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 ?

你可以应用一个CSS规则:

button {  
    white-space: normal !important;
}

但是,按钮的高度将不再相等…