Checkbox CSS发光颜色

时间:2017-11-24 11:59:39

标签: css twitter-bootstrap checkbox twitter-bootstrap-3

有没有办法在焦点上更改/强制复选框发光颜色?

$(function() {
  $('input[type!=hidden]:first').focus();
});
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<input type="checkbox">

1 个答案:

答案 0 :(得分:1)

重新定义复选框的css :focus 属性:

&#13;
&#13;
  
&#13;
input[type="checkbox"]:focus {
  outline-color: green;
}
&#13;
<input type="checkbox">
&#13;
&#13;
&#13;