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;
}
精彩评论