.i_input{ border:#00b5c3 1px solid;}
.i_input:focus {
outline:none;
border: 1px solid red;
}
<input type="text" placeholder=" 输入你真实的姓名" class="i_input">
js-选中切换背景色:
$(document).ready(function(){
$('label').click(function(){
if($(this).children('input').is(":checked")){
$(this).css('background-color','#f7edb8');
$(this).nextAll().css('background-color','#f8fbf9');
$(this).prevAll().css('background-color','#f8fbf9');
}
})
})
.i_input:focus {
outline:none;
border: 1px solid red;
}
<input type="text" placeholder=" 输入你真实的姓名" class="i_input">
js-选中切换背景色:
$(document).ready(function(){
$('label').click(function(){
if($(this).children('input').is(":checked")){
$(this).css('background-color','#f7edb8');
$(this).nextAll().css('background-color','#f8fbf9');
$(this).prevAll().css('background-color','#f8fbf9');
}
})
})