Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Jquery mobile 智能截断页眉和页脚中的 h1 h2 标签。我看过很多教程如何避免这种情况。但我的需求不同,我自定义了没有数据角色的 div。我需要在这个 div 中截断 h2 h3 标题文本。
如何在自定义文本标题上启用截断长文本?
您还可以简单地使用以下样式元素创建一个类:
<div> <h1 style="text-overflow: ellipsis;overflow: hidden;white-space: nowrap;"> This is very long text This is very long text This is very long text This is very long text This is very long text </h1> </div>