jquery - 覆盖 jquery 移动按钮边距

标签 jquery css html jquery-mobile jquery-mobile-button

我正在为我确定是一个简单错误而转动轮子。

考虑以下 jqm(版本 1.3) View (在 haml 中)

#main-header{'data-role' => 'header'}

#main-content{'data-role' => 'content'}   #main-buttons
    %input#a{'type' => 'button', 'name' => 'a', 'value' => 'A'}
    %input#b{'type' => 'button', 'name' => 'b', 'value' => 'B'}

样式表:

#main-buttons {
  margin: 30px;
  margin-top: 160px;
}   

#a {
  margin-bottom: 60px !important;
}

这里我应用到按钮“a”的 margin-bottom 样式没有影响。我的目标是在两个按钮之间添加一些垂直空间。我错过了什么?

呈现的 UI 如下所示:

rendered ui

最佳答案

这是我谦虚的回答。以上答案详细解释了您的问题。

要覆盖按钮样式,请将您的样式添加到 .ui-btn

很高兴我能帮上忙 :)

关于jquery - 覆盖 jquery 移动按钮边距,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15666367/

相关文章:

javascript - 添加更多按钮在我的管理面板上不起作用

javascript - 在 jQuery 中匹配 css 媒体查询

javascript - 从上下文中获取标题

jquery - 在鼠标移出事件上,我希望页面刷新 div 中的 iframe

javascript - jQuery + Animate.css 动画只工作一次,动画不重置

javascript - JQuery:使用 :not(.active) 选择器,并向所选项目添加 Active 类

html - z-index 不能正常工作

html - 是否可以使用 localStorage 进行客户端页面/DOM 缓存?

html - 如何在 css 中模糊我的背景图像?

html - CSS - 如何处理位置 :absolute elements when resizing with media queries