1

展開すると、その下のコンテンツをロールオーバーする折りたたみ可能なものを作成しようとしています。したがって、その下のコンテンツはそのまま残ります。

 <div data-role="collapsible">
     <h3>Content of collapsible</h3>
     <ul data-role="listview">
         <li>I'm the collapsible set content.</li>
         <li>I should roll over the data beneath me.</li>
     </ul>
 </div>
 <div>
     <p>I'm data underneath.</p>
     <p>I should remain in place when the collapsible is unfolded.</p>
 </div>

実際のサンプルコード: http://jsfiddle.net/3swM6/

おそらく、これを達成するために間違ったアプローチを使用しています。

4

2 に答える 2

1

この効果を実現するには、「貼り付ける」コンテンツの位置を設定する必要があります。

これが実際の例です: http://jsfiddle.net/jakemulley/xU6Pv/

次のCSSを使用しました。

.hider .ui-collapsible-content {
    position: absolute;
    width: 100%;
}

私が助けてくれることを願っています!

于 2014-04-27T22:09:27.933 に答える
1

jQueryMobile によって生成された折りたたみ可能なコンテンツには、次の CSS ルールが必要です。

position: absolute;
width: 100%;

jsfiddle の実際の例を次に示します: http://jsfiddle.net/3swM6/1/

于 2014-04-27T22:09:41.230 に答える