我在jquery手机中有一个可折叠的集合,如下所示:
<div data-role="collapsible-set">
<div data-role="collapsible">
<h1>
<span style="font-size: 16px; font-weight: bold; white-space: pre-wrap;" id="title">This is a really long book title</span><br>
<span style="font-size: 14px; font-weight: normal;" id="author">This is the Author of the book</span>
<span style="font-size: 14px; font-weight: normal; font-style: italic;" id="year">Yr</span>
</h1>
<div>Info inside set</div>
</div>
</div>我希望我的用户能够高亮显示每个列表项标题中的文本(我的h1标记中的内容),类似于如何突出显示可折叠部分中的文本。这样就可以复制/粘贴文本。
我意识到整个列表项目本质上都是按钮。但是,它是否有可能只使加号图标按钮?这样我的标题中的文字就可以高亮显示了吗?
这是我的可折叠集的小提琴。
发布于 2014-12-29 21:35:03
我不确定它们是否是在按钮上启用副本的Jquery方式,也不确定是否有任何CSS黑客也会启用副本。
无论如何,此方法使按钮宽度变小。标头位于可折叠的上方,即使可折叠的s是动态的,也应该是可以的。一些其他css移动所有的东西一点,所以他们对齐,好。它可以改进一点,但正如你所看到的,它当然是可行的。
Demo
CSS
.ui-collapsible-inset .ui-collapsible-heading .ui-btn
{width:15px !important;
margin-top: -45px;
position: fixed;}
.ui-btn-icon-left { padding-left: 0 !important; }
.nextto { margin-left:50px; margin-bottom:5px}
结果

https://stackoverflow.com/questions/27694031
复制相似问题