CSS Border for checkbox

拟墨画扇 提交于 2019-11-30 04:51:03

问题


I am applying a style for a checkbox from jQuery

$("#reg_checkbox").css("border","thin solid red");

The border works fine in IE but not in mozilla , how can I make it browser compatible ?


回答1:


Use Outline: http://jsfiddle.net/Kqcx7/1/

$('#reg_checkbox').css('outline-color', 'red');
$('#reg_checkbox').css('outline-style', 'solid');
$('#reg_checkbox').css('outline-width', 'thin');



回答2:


First result on Google - seems like this one worked for them:

http://www.webdeveloper.com/forum/showthread.php?t=122669



来源:https://stackoverflow.com/questions/4600790/css-border-for-checkbox

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!