【发布时间】:2015-01-20 10:42:23
【问题描述】:
我在这个列表视图中使用 Jquery mobile。我无法摆脱第一项的边距。
这是我的 html 代码:
<ul data-role="listview" data-inset="true">
<li data-icon="false">
<a href="#meals"><img src="images/meal.jpg" alt="meal" /><h2>Meals</h2><p>Enjoy the sweet Tinulang Barbeque ni Mang Juan for $99.</p></a>
</li>
<li data-icon="false">
<a href="#desserts"><img src="images/desserts.jpg" alt="dessert"/><h2>Desserts</h2><p>Taste the Sea of Pier 3 with Condensed milk for $11.</p></a>
</li>
<li data-icon="false">
<a href="#beverages"><img src="images/beverages.jpg" alt="beverage"/><h2>Beverages</h2><p>Drink the Water of Pandora with Amonium Nitrate for $25.</p></a>
</li>
</ul>
我尝试了这个 css 代码,但还是一样:
.listitem {
margin-top: 0px !important;
}
#list{
-webkit-box-shadow: none;
box-shadow: none;
border: none;
}
#list .ui-li {
border: none;
}
有什么想法吗?
【问题讨论】:
-
:first-child选择器css-tricks.com/almanac/selectors/f/first-child -
其他浏览器没有问题,只出现在冰淇淋三明治设备上。
标签: css html listview jquery-mobile