+ 1
Can anyone explain the css part of this code?
2 Answers
+ 2
input:focus{
width: 250px;
}
There, you said to set the inputâs width as 250pixels when the input has focus, or when user clicks on it to type.
input{
transition: width .35s ease-in-out;
}
And then there you said to transition to 250px in 0.35 seconds.
You said to make the inputâs width 250px, first, and then you added a transition for it...
+ 3
input[type=text]
select 'input' tag that has 'type' attribute with value of 'text'
input[type=text]:focus
give a style when it get focused