jquery-mobile - li-desc 的 jQuery Mobile 溢出

标签 jquery-mobile responsive-design overflow

如何强制标题可见,而下面的文本溢出到省略号中?当页面宽度超过 768 像素时,我无法让它与 BlackBerry 列表项一起使用。

http://jsfiddle.net/TeNXG/14/

<div data-role="page" data-theme="a" id="demo-page" class="my-page" data-url="demo-page">
<div data-role="header">
    <h1>News</h1>
    <a href="grid-listview.html" data-shadow="false" data-iconshadow="false" data-icon="arrow-l" data-iconpos="notext" data-rel="back" data-ajax="false">Back</a>
</div><!-- /header -->
<div data-role="content">
    <ul data-role="listview">
        <li><a href="#">
            <img src="http://view.jquerymobile.com/master/docs/_assets/img/apple.png">
            <h2>iOS 6.1</h2>
            <p>Apple released iOS 6.1</p>
            <p class="ui-li-aside">iOS</p>
        </a></li>
        <li><a href="#">
            <img src="http://view.jquerymobile.com/master/docs/_assets/img/blackberry_10.png">
            <h2>BlackBerry 10</h2>
            <p>BlackBerry launched the Z10 and Q10 with the new BB10 OS and more and stuff and lots of stuff and overflowing and stuff and wow so much text man holy mess even more let's see just how jacked we can make this div</p>
            <p class="ui-li-aside">BlackBerry</p>
        </a></li>
    </ul>
</div><!-- /content -->
<div data-role="footer" data-theme="none">
    <h3>Responsive Grid Listview</h3>
</div><!-- /footer -->

最佳答案

添加 white-space: nowrap;到描述块:

ui-listview .ui-li-desc {
    white-space: nowrap;
    overflow: visible;
    position: absolute;
    left: 0;
    right: 0;   
}

查看更新 jsFiddle .

关于jquery-mobile - li-desc 的 jQuery Mobile 溢出,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15093501/

相关文章:

html - 手机横屏模式下div不调整

html - 表格溢出div时的圆 Angular ?

jquery - 在基于 jQuery Mobile 的页面中将元素插入到 DOM 中

在平板电脑上长按/点击时触发 Javascript 事件

html - 移动端的 chrome 和 firefox 的 css 不同

safari - 在 Safari 中应用 -webkit-transform 后无法在 div 内滚动

jquery - CSS + .MOV 对象

jquery手机图片不显示

jquery - jquery mobile 与 jquery 在 codeigniter 中的顺序 - 页面不会加载提交的 View

javascript - 浏览器:未捕获的安全错误:无法在 'replaceState' 上执行 'History':具有 URL 的历史状态对象