简体   繁体   中英

change checkbox border color

can i change border color of checkbox by use css or 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. if you use jqueryUI there are some implementations of checkboxes like this or this . 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. 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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