开发者

How do I change the backcolor of a textbox when user clicks into it with CSS

开发者 https://www.devze.com 2022-12-21 06:09 出处:网络
Question is 开发者_如何学编程in the subject.Demonstration :) textarea:focus { background-color: #00ff00;

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

精彩评论

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