The Input element removes the border when it gets focus

The Input element removes the border when it gets focus

1.1 Overview
        In a web page, when switching with the tab key, there will be a dotted box (or highlight box) outside the text link, search box, button, etc. At this time, the current element has gained the focus and can be operated on.
        Note: This function is generally prepared for users who use the keyboard, and it is recommended not to remove it.
        When the input tag gets the focus (for example, when the cursor is placed in the input box to prepare the input value), a border will appear around the input tag. If you need to remove this border, you can use the outline:none; of CSS (focus box when the element gets the focus) 0) attribute.
1.2 Extension - CSS outline property
1. Definition
          outline (outline) is a line drawn around the element, located on the periphery of the border edge, which can play a role in highlighting the element. outline is a shorthand property, all outline properties are set in one declaration, that is, outline-color, outline-style, outline-width properties can be set in order.
Note:
        1" The outline will not occupy space, and it is not necessarily a rectangle.
        2" If the outline does not set a value of outline-color, outline-style, and outline-width, it is also allowed, such as outline:solid #ff0000;.
        3" Always declare the outline-style property before the outline-color property. Because the element can only change the color of its outline after getting the outline.

2. Browser support
        All browsers support the outline attribute.
Notice:
        IE8 supports the outline attribute if !DOCTYPE is specified.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326444670&siteId=291194637