In chrome, how to prevent the yellow border from appearing in the focus of input [text] And textarea _ javascript skills

Source: Internet
Author: User
Chrome is a very good web browser for both developers and general users. However, during development, it makes people feel that many other features are, A yellow border, especially the input [text] And textarea, appears when the control in the form item is focused. in the lower right corner of the textarea, a function of dragging the size of the table textarea is available, as shown in:

Input [text]:

Textarea:

Sometimes the yellow border affects the page effect, and the layout is directly affected after the textarea is dragged to change the size, so in order not to affect the page with these redundant functions and effects, you can use the following CSS statements to clear the default Effect of chrome. The Code is as follows:

The yellow border generated when the form item focus is canceled:

The Code is as follows:


Input, button, select, textarea {outline: none}


Cancel the function of changing the size by dragging textarea:

The Code is as follows:


Textarea {resize: none}


After merging:

The Code is as follows:


Input, button, select, textarea {outline: none ;}
Textarea {font-size: 13px; resize: none ;}

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.