jqm long可折叠标题被截断

时间:2014-02-17 13:26:53

标签: jquery-mobile

我们需要在可折叠中使用多行标签,因为它们会被截断到JQM 1.4或更高版本

<div data-role="collapsible-set">
  <div data-role="collapsible">
    <h3>My header with long text that truncated when viewing on mobile device or small     screens.</h3>
    <fieldset data-role="controlgroup">
    ...

A solution that worked for jqm 1.3 was:

.ui-mobile .ui-page .ui-content .ui-collapsible .ui-collapsible-heading .ui-btn-text {
        white-space : normal;
}?

截断/ 10254192#10254192

如下所示: Prevent JQuery Mobile collapsible set header from being truncated

尽管如此,因为jqm 1.4版已弃用.ui-btn-text,该解决方案不再适用

问题:如何避免长篇文章被截断?或者换句话说,如何获得可折叠的多行标签?

由于

1 个答案:

答案 0 :(得分:4)

文本直接包含在锚标记中,其中包含一个ui-collapsible-heading-toggle类。所以这应该有效:

.ui-collapsible-heading-toggle {
    white-space : normal;
}