<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="http://libs.baidu.com/jquery/1.9.0/jquery.js"></script>
<style>
label{
width:20px;
height:20px;
display:inline-block;
background: url(box.png) no-repeat;
}
label.checked {
background: url(box_choose.png) no-repeat;
}
label input{
display:none;
}
</style>
</head>
<body>
<label><input type="radio" name="rule"></input></label>
<label><input type="radio" name="rule"></input></label>
<label><input type="radio" name="rule"></input></label>
<label><input type="radio" name="rule"></input></label>
</body>
<script>
$(function(){
$('label').click(function(){
$('label').removeAttr('class') && $(this).attr('class', 'checked');
$('label').children('input').removeAttr('checked') && $(this).children('input').attr('checked', 'checked');
});
})
</script>
</html>
html修改默认单选框样式
5星 · 超过95%的资源 需积分: 50 73 浏览量
2017-03-17
10:31:24
上传
评论
收藏 3KB ZIP 举报
YanzYan
- 粉丝: 27
- 资源: 5
最新资源
- stm32f103c8t6+hc05+l298n蓝牙小车
- WPF 自定义控件,模仿combobox控件
- 四旋翼双环pid控制matlab版本R2020b源码.zip
- fbbev在自己电脑上转onnx遇到资源问题,试着放在公用机上运行
- 微信小程序源码 V2EX - 创意、技术和分享的社区平台
- 基于Python+OpenFace+MySQL开发人脸识别的课堂考勤系统源码+pyqt5界面+使用说明.zip
- 微信小程序源码 高效任务管理 - 专业级Todo List应用下载
- 深度老龄化社会背景下老年人文娱生活的现状及新路径研究.caj
- 微信小程序源码 TCP/IP长连接实现 - 高效网络通信解决方案
- 基于RSSI测距的多边定位法matlab仿真源码及python源码(95分以上).zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈