listview with white-space for jquery mobile

时间:2014-01-17 14:43:33

标签: javascript jquery css listview jquery-mobile

我的代码:

<div data-role="content" id="merlin">
    <div data-role="collapsible-set" data-theme="c" data-content-theme="d" data-inset="false">
        <div data-role="collapsible">
            <h2>That is a serious problem and I don't know how to solve it</h2>
            <ul data-role="listview">
                <li>some content</li>
            </ul>
        </div>
    </div>
</div>

输出:

http://s14.directupload.net/images/140117/6foqxhjr.png

我想要的是什么:

白色空间(或说自动换行?)阅读整个标题

我尝试了什么:

#merlin {
    white-space: normal;
}​

.ui-page .ui-content .ui-listview .ui-li-desc {
    white-space : normal;
}​

1 个答案:

答案 0 :(得分:0)

您需要定位课程ui-btn-text尝试此选择器:

#merlin .ui-btn-text {
  white-space:normal;
}

选中 Demo Fiddle