Chrome input box default style removal

Source: Internet
Author: User

Chrome input box default style removal

In the Chrome browser, default to the input boxes on the page, such as input, textarea, and so on render the browser's own border effect

The IE8 effect is as follows:

    

The results in Chrome are as follows:

This gives us great convenience when we change the border color when we do not give the input box the focus, and the Chrome browser resolves the border effect by default when the input box gets focus. If we want to set the border color ourselves, Chrome's default action poses a problem for our settings (boder:1px solid color), which is what you'll find when your settings are available in other browsers, but not in chrome.

To solve this problem, we just need to add the following CSS to solve the problem:

*:focus {outline:none;}

If you want to add a style to an input box, you can do the following:

#inputBT: Focus {outline:1px solid #ed6f19;}

Effect into the following:

This setting will find that there is a thin border next to the orange border color, the CSS style will be changed to a perfect solution:

{ Border: 1px solid #ed6f19;}

Chrome input box default style removal

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.