How do I change the backcolor of a textbox when user clicks into it with CSS
Question is 开发者_如何学编程in the subject.
Demonstration :)
textarea:focus
{
background-color: #00ff00;
}
You can use CSS pseudo-class selectors like this:
textarea:focus { background-color: red }
Note that this doesn't work IE7 and lower.
input[type='text']:focus {
background-color: #0066FF;
}
精彩评论