我遇到了一个问题,jQuery移动可折叠div在页面宽度缩小(即在移动设备上看到的)时不会缩小。我有它,所以页面上的每个其他元素都有适当的缩放(宽度),但是可折叠的div超出了它们的界限,我无法使它们更小(比页面宽度更宽)。
剪掉可折叠的标题标签是可以的,我只是不知道怎么做。我觉得这可能更多的是一个概念性的问题,但我发布了一些代码供参考:
<table id="DataTable" style="width:100%" cellpadding="0" cellspacing="0">
<tr>
<td>
<div id="row" class="Collapsible" data-role="collapsible" data-theme="c" data-content-theme="c" style="margin:0">
<h3>Example header label (Can be covered)</h3>
<p>Contents of the div on expand</p>
</div>
</td>
</tr>
</table>
发布于 2012-05-17 20:55:52
我认为问题出在.ui-btn-inner
:white-space: nowrap;
的css定义上。尝试使用以下命令覆盖它:
.ui-btn-inner {
white-space: normal !important;
}
另请参阅this example。
===更新===
您可以添加以下css以将可折叠的div
(和h3
)更改为内联元素:
.Collapsible, .Collapsible h3 {
display: inline !important;
}
另请参阅my updated example。
https://stackoverflow.com/questions/10635985
复制相似问题