css - 如何删除 jquery 移动网格之间的空间?

标签 css jquery-mobile

我在页面中使用了多个 jQuery Mobile 网格,我想删除网格之间的空间。

<div class="ui-grid-a">
    <div class="ui-block-a">
        <a href="#" data-corners="false" data-icon="alert" data-iconpos="top" data-role="button" onclick="click()">Button 1</a>
    </div>
    <div class="ui-block-b">
        <a href="#" data-corners="false" data-icon="star" data-iconpos="top" data-role="button" onclick="click()">button 2 </a>
    </div>
    <div class="ui-block-a">
        <a href="#" data-corners="false" data-icon="location" data-iconpos="top" data-role="button" onclick="click()">Button 3</a>
    </div>
    <div class="ui-block-b">
        <a href="#" data-corners="false" data-icon="info" data-iconpos="top" data-role="button" onclick="click()">button 4 </a>
    </div>
</div>

Check this demo here

它显示了按钮之间的空间,但我需要那个按钮来覆盖所有空间。 我只想更改此网格,因为页面上有多个网格。

最佳答案

正如我在评论中提到的,像下面这样更新您的 CSS 并根据父类进行定位。

 .ui-grid-a [class*=ui-block-]>.ui-btn, .ui-grid-a [class*=ui-block-]>.ui-select,  .ui-grid-a [class*=ui-block-]>.ui-checkbox,  .ui-grid-a [class*=ui-block-]>.ui-radio,  .ui-grid-a [class*=ui-block-]>button.ui-btn-inline,  .ui-grid-a [class*=ui-block-]>button.ui-btn-icon-notext
{
margin:0px;
}

DEMO

关于css - 如何删除 jquery 移动网格之间的空间?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27421654/

相关文章:

javascript - jquerymobile 中 mobile.changepage 时参数正在传递但未检索

javascript - 未定义显示而不是 Twitter 的用户名

css - 如何在不删除 :before pseudo element css 内的文本的情况下隐藏标签上的文本

html - CSS如何应用:first-child and :last-child

ajax - 通过对话框提交的表单再次打开对话框

jquery-mobile - JQuery Mobile 移除光盘背景

javascript - JQuery mobile 中的多个可过滤选择菜单

jquery 在显示和隐藏 div 后转到 div 或页面的顶部

html - 使用 html/css 设置滚动步长/跳跃/捕捉距离

html - 如何获得 float :right button to vertically align in the middle