1

I have a list of things like this:

 <ul data-role="listview" data-theme="c">
     <li><item 1/li>
     <li>item 2</li>
 </ul>

However, the sides of this keep stretching to the very end of the page. How could I add some kind of padding around the edges like in the api example found here: http://jquerymobile.com/demos/1.2.0/docs/lists/lists-nested.html

I know I can add some css that would ajust the margin, However I don't want this to be added when viewing the page on a cell phone Thanks

4

1 回答 1

3

好吧,您可以使用标准解决方案:

<ul data-role="listview" data-theme="c" data-inset="true">
    <li><item 1/li>
    <li>item 2</li>
</ul>

或者你可以像这样去所有突击队:

.ui-listview {
    margin: 20px !important;
}

工作示例:http: //jsfiddle.net/Gajotres/2PhBQ/

于 2013-05-11T17:45:07.613 回答