css 设置input选中后样式
.i_input{border:#00b5c31pxsolid;}
.i_input:focus{
outline:none;
border:1pxsolidred;
}
<inputtype="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');
}
})
})
相关推荐
Ladyseven 2020-10-22
李鴻耀 2020-08-17
yaodilu 2020-08-03
myloveqiqi 2020-08-09
AlisaClass 2020-07-19
jiedinghui 2020-10-25
zuncle 2020-09-28
xiaohuli 2020-09-02
葉無聞 2020-09-01
nicepainkiller 2020-08-20
AlisaClass 2020-08-09
buttonChan 2020-08-02
drdrsky 2020-07-29
Ladyseven 2020-07-25
nicepainkiller 2020-07-24
hellowzm 2020-07-19
background-color: blue;background-color: yellow;<input type="button" value="变蓝" @click="changeColorT
昔人已老 2020-07-19
骆驼的自白 2020-07-18
lanzhusiyu 2020-07-19