javascript - 如何添加空白 :normal in this jQuery Mobile grid button text?

标签 javascript jquery css jquery-ui jquery-mobile

这是我的 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

最佳答案

您可以应用 CSS 规则:

button {  
    white-space: normal !important;
}

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

关于javascript - 如何添加空白 :normal in this jQuery Mobile grid button text?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30445587/

相关文章:

javascript - AngularJS - 默认保存属性值

jquery - 无法让 jQuery 与 Icefaces + Liferay 一起使用

css - 如何获得要重复的透明背景图像

html - 禁用单个列和行的边框折叠

php - Javascript PHP 更新所有打开的实例,例如 Facebook

javascript - 通过按下 CSS 中的按钮向下滚动

Javascript 最佳实践和文档就绪

jquery - 通过 JQuery css 方法设置元素的不透明度删除背景图像

javascript - 一起使用背景、内容和开发工具进行扩展

javascript - 为什么这个 JS 变量在页面加载时运行