开发者

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;  
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜