移动端对radio和checkbox的样式调整
2015-07-07 11:51
323 查看
<style>
*{padding: 0;margin: 0;-webkit-tap-highlight-color:rgba(0,0,0,0);outline:none;}
#checkbox{width:25px;height: 25px;-webkit-appearance: none;background: #ccc;}
#checkbox:checked{background: #ff0;}
.radiobox{width:25px;height: 25px;-webkit-appearance: none;background: #0ff;}
.radiobox:checked{background:#00f;}
</style>
</head>
<body>
<div class="container">
<input type="checkbox" id="checkbox"/> <br/>
<input type="radio" class="radiobox" name="question"/>A <input type="radio" class="radiobox" name="question"/>B
</div>
</body>
</html>
*{padding: 0;margin: 0;-webkit-tap-highlight-color:rgba(0,0,0,0);outline:none;}
#checkbox{width:25px;height: 25px;-webkit-appearance: none;background: #ccc;}
#checkbox:checked{background: #ff0;}
.radiobox{width:25px;height: 25px;-webkit-appearance: none;background: #0ff;}
.radiobox:checked{background:#00f;}
</style>
</head>
<body>
<div class="container">
<input type="checkbox" id="checkbox"/> <br/>
<input type="radio" class="radiobox" name="question"/>A <input type="radio" class="radiobox" name="question"/>B
</div>
</body>
</html>
相关文章推荐
- jQuery根据ID获取input、checkbox、radio、select的示例
- jquery实现的代替传统checkbox样式插件
- asp.net动态产生checkbox(数据源为DB或内存集合)
- asp.net gridview中用checkbox全选的几种实现的区别
- asp.net treeview checkbox 相关问题
- IE中checkbox在刷新后初始化的问题
- 浅谈checkbox的一些操作(实战经验)
- asp.C#实现图片文件与base64string编码解码
- JavaScript通过this变量快速找出用户选中radio按钮的方法
- 多个datatable共存造成多个表格的checkbox都被选中
- javascript使用shift+click实现选择和反选checkbox的方法
- JS选中checkbox后获取table内一行TD所有数据的方法
- 用Javascript读取CheckBox数组的值的代码(兼容IE与firefox)
- javascript获取checkbox复选框获取选中的选项
- 关于树形菜单 Checkbox的全选
- javascript radio list的实现细节(多浏览器兼容)
- 利用JavaScript更改input中radio和checkbox样式
- 原生js操作checkbox用document.getElementById实现
- jquery获取radio值(单选组radio)