开发者

How to get rid of the browser's native TEXTAREA highlighting?

How c开发者_如何转开发an I control the browser's native textarea highlighting? Twitter's status textarea is a good example for that. They fade in a lighter border. Can it be removed completely?

Thanks!


You can use the outline property to control the highlighting:

textarea {
    outline: 0;
}

Remember however that a :focus style is useful for accessibility reasons, so you'd probably want to highlight focused fields in some manner, such as with a light background:

textarea:focus { 
   background-color: #FFEFC6;
}
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜