【问题标题】:Remove the border of collapsible div within listview删除listview中可折叠div的边框
【发布时间】:2013-09-16 01:31:54
【问题描述】:

我在删除 li 标签内的可折叠 div 的边框时遇到了问题。 演示在http://jsfiddle.net/lightbringer/FsSmy/

<ul id="userstorylist" data-role="listview" data-filter="true">
    <li id="draggable">
        <div data-role="collapsible" data-theme="b" data-content-theme="d">
            <h3>Userstory 1</h3>
            <p>Content</p>
        </div>
    </li>
    <li id="draggable">
        <div data-role="collapsible" data-theme="b" data-content-theme="d">
            <h3>Userstory 2</h3>
            <p>Content</p>
        </div>
    </li>
</ul>

谁能告诉我如何删除边框,我希望项目像普通列表视图一样粘在一起。

提前致谢。

【问题讨论】:

    标签: html jquery-mobile-listview jquery-mobile-collapsible


    【解决方案1】:

    我自己找到了解决办法。

    <ul data-role="listview" data-filter="true">
        <li class="custom-li">
            <div class="custom-collapsible" data-name="1" data-role="collapsible" data-theme="b" data-content-theme="d" data-corners="false">
                <h3>Userstory 1</h3>
                <p>Content</p>
            </div>
        </li>
        <li class="custom-li">
            <div class="custom-collapsible" data-name="2" data-role="collapsible" data-theme="b" data-content-theme="d" data-corners="false">
                <h3>Userstory 2</h3>
                <p>Content</p>
            </div>
        </li>
    </ul>
    

    使用 css 样式:

    .custom-li {
            padding: 0 !important;
            border-width: 0 !important;
    }
    
    .custom-collapsible {
        margin: 0 !important;   
        border-bottom-right-radius: 0 !important;
        border-bottom-left-radius: 0 !important;
        border-width:0 !important;
    }
    

    这是演示:http://jsfiddle.net/lightbringer/jWaEv/

    【讨论】:

      猜你喜欢
      • 2019-08-30
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-08-08
      • 1970-01-01
      • 1970-01-01
      • 2013-07-28
      • 1970-01-01
      相关资源
      最近更新 更多