知識點 -獲得焦點元素
:focus 偽類 選擇器用于選取獲得焦點的元素 。 我們這里主要針對的是 表單元素
:hover
語法:
.total input {
border: 1px solid #ccc;
height: 30px;
width: 40px;
transition: all .5s;
}
/*這個input 獲得了焦點*/
.total input:focus {
width: 80px;
border: 1px solid skyblue;
}
border: 1px solid #ccc;
height: 30px;
width: 40px;
transition: all .5s;
}
/這個input 獲得了焦點/
.total input:focus {
width: 80px;
border: 1px solid skyblue;
}