圆月山庄资源网 Design By www.vgjia.com
说起来汗颜,如此常用的checkbox我改变样式,居然需要百度,而且百度很久,更可气的是百度很久找不到可行的解决方案。
后来在csscheckbox.com上找到很多样式,结果一测兼容性IE不行。如此一来,耽误了很久的时间。
抄了近道屡试不行,回归JQuery UI,不用说兼容性挺好,而且样式自己随心画。
在此记录一款checkbox的样式,供大家也供我以后方便使用。
有三种状态,default、hover和active,并测试过,能完美兼容IE8/9/10,FF等。
复制代码代码如下:
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />
<script src="/UploadFiles/2021-03-30/jquery-1.9.1.js"><script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"><script>
$(function() {
$( "#check" ).button();
$( "#format" ).buttonset();
});
</script>
<style>
.ui-button-text-only .ui-button-text {
padding: 8px;
}
.ui-state-default,
.ui-widget-content .ui-state-default,
.ui-widget-header .ui-state-default {
background: url(images/safari-checkbox.png) 0 0 no-repeat; border:none;
}
.ui-state-hover,
.ui-widget-content .ui-state-hover,
.ui-widget-header .ui-state-hover,
.ui-state-focus,
.ui-widget-content .ui-state-focus,
.ui-widget-header .ui-state-focus {
background: url(images/safari-checkbox.png) -16px 0 no-repeat; border:none;
}
.ui-state-active,
.ui-widget-content .ui-state-active,
.ui-widget-header .ui-state-active {
background: url(images/safari-checkbox.png) 0 -16px no-repeat; border:none;
}
</style>
</head>
<body>
<input type="checkbox" id="check" /><label for="check"></label>
</body>
</html>
后来在csscheckbox.com上找到很多样式,结果一测兼容性IE不行。如此一来,耽误了很久的时间。
抄了近道屡试不行,回归JQuery UI,不用说兼容性挺好,而且样式自己随心画。
在此记录一款checkbox的样式,供大家也供我以后方便使用。
有三种状态,default、hover和active,并测试过,能完美兼容IE8/9/10,FF等。
复制代码代码如下:
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />
<script src="/UploadFiles/2021-03-30/jquery-1.9.1.js"><script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"><script>
$(function() {
$( "#check" ).button();
$( "#format" ).buttonset();
});
</script>
<style>
.ui-button-text-only .ui-button-text {
padding: 8px;
}
.ui-state-default,
.ui-widget-content .ui-state-default,
.ui-widget-header .ui-state-default {
background: url(images/safari-checkbox.png) 0 0 no-repeat; border:none;
}
.ui-state-hover,
.ui-widget-content .ui-state-hover,
.ui-widget-header .ui-state-hover,
.ui-state-focus,
.ui-widget-content .ui-state-focus,
.ui-widget-header .ui-state-focus {
background: url(images/safari-checkbox.png) -16px 0 no-repeat; border:none;
}
.ui-state-active,
.ui-widget-content .ui-state-active,
.ui-widget-header .ui-state-active {
background: url(images/safari-checkbox.png) 0 -16px no-repeat; border:none;
}
</style>
</head>
<body>
<input type="checkbox" id="check" /><label for="check"></label>
</body>
</html>
标签:
checkbox,多选框
圆月山庄资源网 Design By www.vgjia.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
圆月山庄资源网 Design By www.vgjia.com
暂无评论...
P70系列延期,华为新旗舰将在下月发布
3月20日消息,近期博主@数码闲聊站 透露,原定三月份发布的华为新旗舰P70系列延期发布,预计4月份上市。
而博主@定焦数码 爆料,华为的P70系列在定位上已经超过了Mate60,成为了重要的旗舰系列之一。它肩负着重返影像领域顶尖的使命。那么这次P70会带来哪些令人惊艳的创新呢?
根据目前爆料的消息来看,华为P70系列将推出三个版本,其中P70和P70 Pro采用了三角形的摄像头模组设计,而P70 Art则采用了与上一代P60 Art相似的不规则形状设计。这样的外观是否好看见仁见智,但辨识度绝对拉满。
更新日志
2024年06月13日
2024年06月13日
- 群星.2002-欢庆迪斯尼100周年3CD【滚石】【WAV+CUE】
- DRY.1998-TWO【正东】【WAV+CUE】
- 马常胜.2012-油菜花开的季节【风潮】【WAV+CUE】
- 世界启元光秀命运羁绊怎么样 光秀命运羁绊介绍
- 世界启元不列颠文明怎么样 不列颠文明选择推荐
- 世界启元光秀技能怎么搭配 光秀技能组合推荐
- 群星《国语老情歌·容易受伤的女人》(2CD)原曲原唱精湛演绎[WAV]
- 群星《HIFI原创烧》2CD[WAV分轨+CUE】
- 哎呀,服务正在维护中……
- 官方确认梅森、哈德森已死亡!不会回归《COD21》
- 苏姿丰展望:AI将在游戏开发和呈现中大放异彩
- 网易暴雪合资公司人事变更 雷火负责人任执行董事
- 海来阿木《五十年以后 1:1母版直刻》[WAV+CUE][560MB]
- 《美国Billboard单曲榜TOP100》[FLAC/分轨][3.2G]
- 周杰伦《圣诞星》2023 [WAV/分轨][40MB]