CSS removes the default outline outer box and css outer box of the browser.
By default, When you click tag a, input, or add a click event, the browser leaves a contour box (blue under chrome )~ However, these default profile boxes sometimes affect the appearance and are not what we want to retain. How should we eliminate these annoying contour boxes?
Use outline: none to remove the outline Outer Frame
For example:
a{ outline:none; }
The profile box on the PC end disappears, but it still exists on the mobile phone ~~
Add the following code.
a{ outline:none; -webkit-tap-highlight-color:rgba(0,0,0,0);}
-Webkit-tap-highlight-color is an unsupported WebKit property that does not appear in the CSS specification draft.
When a user clicks a link in iOS Safari or a JavaScript clickable element, the highlighted color is overwritten.
This attribute can only set transparency. If no transparency is set, iOS Safari uses the default transparency. When the transparency is set to 0, this attribute is disabled. When the transparency is set to 1, the elements are invisible when you click.
Syntax:
-Webkit-tap-highlight-color: Color
Default Value: Inherit
Applicable: Link elements such as opening a new window, img elements such as saving images, etc.
Valid value:
-
Color: color value
-
Transparent: transparent Value
* Descriptions of newly added attributes in CSS3 may be incorrect and changed. This attribute is for reference only and is continuously updated.
Compatibility:
- Available for iOS 1.1.1 and later Safari browsers
- Most android phones also support this function, but the display effect is different.
PS: This article