Remove the yellow focus box from the input (text box) or textarea in the WebKit (Chrome) browser

Source: Internet
Author: User

Using the WebKit Core browser is a pretty good web engine for developers and general users, but one of the things that makes people feel redundant in development is that a yellow border always appears when the controls in a form item are focused (360 haste mode is the kernel of WebKit, Compatibility mode is IE kernel and Trident kernel), especially input[text] and textarea, and in the lower right corner of the textarea there is a mouse to drag the size of the table textarea the function.

Sometimes the yellow border affects the page effect, and the textarea drag changes the size of the layout directly, so in order not to make these extra features and effects on the page, you can use a few CSS to clear out the Chrome browser default effect, the code is as follows:

Suppress the yellow border that occurs when a form item is focused:
Input,button,select,textarea{outline:none}

Remove the textarea drag to change the size of the function:
Textarea{resize:none}

Finally merge the above two CSS as follows:
input,button,select,textarea{Outline:none;}
textarea{font-size:13px; resize:none;}

Remove the yellow focus box from the input (text box) or textarea in the WebKit (Chrome) browser

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.