简体   繁体   English

更改复选框边框颜色

[英]change checkbox border color

can i change border color of checkbox by use css or jquery. 我可以使用css或jquery更改复选框的边框颜色。 i want change only border color of check box. 我想只更改复选框的边框颜色。

if you want to do this with pure css, you won't get an result that works in all browsers. 如果你想用纯css做这个,你将得不到适用于所有浏览器的结果。 if you use jqueryUI there are some implementations of checkboxes like this or this . 如果你使用jqueryUI,有一些像这样这样的复选框的实现。 otherwise you'll have to do something similar by yourself using images. 否则你将不得不自己使用图像做类似的事情。

edit: 编辑:
please note: as of today (march 2015) this post is about 5 years old - back then, the IE6 still had a market share of about 10% and even the newest IE (Version 8 at that time) was crappy as hell. 请注意:截至今天(2015年3月),这篇文章大约有5年的历史 - 当时,IE6的市场份额仍然约为10%,即使是最新的IE(当时的版本8)仍然很糟糕。 This answer is technically outdated nowadays . 这个答案在技术上已经过时了

Checkboxes are notorious for behaving differently to styles for each browser that renders them. 复选框因呈现它们的每个浏览器的样式表现不同而臭名昭着。 As Nick Craver commented, images are the only reliable way to style checkboxes safely. 正如Nick Craver评论的那样,图像是安全地设置复选框样式的唯一可靠方法。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM