简体   繁体   English

带空白的jQuery Mobile ListView

[英]listview with white-space for jquery mobile

My Code: 我的代码:

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

Output: 输出:

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

What I want: 我想要的是:

White-Space (or say word wrap?) to read the whole heading 空格(或说自动换行?)阅读整个标题

What I've tried: 我试过的

#merlin {
    white-space: normal;
}​

or 要么

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

You need to target the class ui-btn-text try this selector: 您需要将ui-btn-text类作为目标,请尝试使用以下选择器:

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

Check this Demo Fiddle 检查这个演示小提琴

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM