jquery - 如何从 jquery 移动单选按钮中删除边框

标签 jquery css jquery-mobile

我想保留一些格式但删除 jQuery 单选按钮的边框。有一个没有阴影的主题也很好。是否有 jQM 的干净版本?我使用了 themeroller,但我仍然在文本中看到阴影,并且找不到删除样式的方法...

<div data-role="fieldcontain" data-mini="true">
  <div data-role="fieldcontain">
    <fieldset data-role="none">
      <input type="radio" name="" id="Select_0" value="" />
      <label for="Select_0">option1</label>
      <input type="radio" name="" id="Select_1" value="" />
      <label for="Select_1">option1</label>
      <input type="radio" name="" id="Select_2" value="" />
      <label for="Select_2">option1</label>
      <input type="radio" name="" id="Select_3" value="" />
      <label for="Select_3">option1</label>
    </fieldset>
  </div> 
</div>

what I want radio problems

蓝色是我想要的,绿色是我现在拥有的。 蓝色来自http://www.maratz.com/blog/archives/2006/06/11/fancy-checkboxes-and-radio-buttons/我想替换花式复选框的 jQM 样式。

最佳答案

您可以在底部添加一些样式,以非常接近您要查找的样式。(建立在 twsansbury 的答案之上)

/* remove rounded corners */
.ui-btn-corner-all {
  -moz-border-radius: 0px;
  -webkit-border-radius: 0px;
  border-radius: 0px;
}

/* remove border between each item */
.ui-btn-inner{
  border: 0;
}

/* remove margin between items */
fieldset .ui-radio {
  margin: 0;
}

/* change background, remove other border, unbold text */
.ui-btn-up-a, .ui-btn-hover-a, .ui-btn-down-a {
  background: #4f83bc;
  background-image: none;
  border: 0;
  font-weight: normal;
}


/* change color of radio background */
.ui-checkbox-on .ui-icon, .ui-radio-on .ui-icon {
  background-color: #456;
}

结果:

enter image description here

http://jsfiddle.net/bJHrM/7/

关于jquery - 如何从 jquery 移动单选按钮中删除边框,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10919288/

相关文章:

javascript - 在 Jquery UI 对话框中禁用按钮?

css - 垂直对齐 100vh 容器内的文本

jquery - 将第 n 个项目聚焦在 Jquery Mobile ListView 上

jquery - 使用 jquery.load() 加载的元素不存在

javascript - jQuery wookmark 插件动态 div 高度

php - PHP 套接字是进行基于 PHP jQuery 的聊天的可行选项吗?

css - 需要完整图像作为背景封面卷轴,当前封面看起来完整放大。我希望使用较少的缩放而不是完全缩放可以看到实际图像

html - 列宽不均

c# - 将 Json 数据打印为 Html 表

jquery-mobile - jQuery Mobile与AngularJs页面导航