Solution for setting the border: none attribute of the button in IE is invalid
This article describes the solution for setting the border: none attribute in IEAs invalid. The following two methods are provided, which can be used as a reference.
When setting a borderless element, you only need to set border: none for the element. Of course, setting border: 0 has the same effect, but actually there is a performance difference between the two.
The Code is as follows:
Border: none: The border is set to none without any processing;
Border: 0: The border width is set to 0 pixels, but the border-color and border-style are still rendered.
However, in IE, this is true for the button and input elements. In IE6, 7, border: none is only equivalent to border-style: none, while the border space is still in place. This leads to inconsistent width and height of input adjustment in various browsers! In IE6, 7, although border: none is set, the border still exists. Do not believe it.
The solution is as follows:
Method 1:
The Code is as follows:
Border: 0 none;
Method 2:
Add a background color to the button.
Copy the Code as follows:
Button {
Background: # fff;
}