use CSS to remove the default fillet style for buttons on IPhone pagesUsing the browser on the IPhone to browse the Web, the button always shows the style of the super-large corner, it seems super disgusting, but we have no effect on the definition of Border-radius, after the search found that this is the Webikt kernel browser through the private properties- Webkit-appearance sets the default style for the control.
input {-webkit-appearance:none; /*去除input默认样式*/}
Input[type="Submit"],
Input[type="Reset"],
Input[type="button"],
Input{-webkit-appearance:none;}
When we write the form, we will find that some browsers have given the form the default style, such as the Chorme Browser, text box and drop-down selection box when loading the focus, there will be a glowing border, and in Firefox and Google Browser, multi-line text box textarea can also be free to drag and pull large, Also under IE10, when the text box is entered, a small fork will appear on the right side of the text box, and so on. No doubt, these effects are improved in the user experience, but sometimes we don't need these default styles, what do we do? Let's take a look at the solution separately.
1, remove chrome and other browser text box default Glow border
|
input:focus, textarea:focus { outline : none ; } |
Remove the Highlight style:
input:focus{
-webkit-tap-highlight-color:rgba (0,0,0,0);
-webkit-user-modify:read-write-plaintext-only;
}
Of course, when the text box is loaded into focus, the borders of the text boxes under all browsers will not change in color or style, but we can set them back to our own needs, such as:
|
input:focus,textarea:focus { outline : none ; border : 1px solid #f60 ; } |
That way, when the text box is loaded into focus, the border color turns orange, giving the user a feedback.
2. Remove the small fork behind the ie10+ browser text box
Just the following sentence is OK
|
input::-ms-clear { display : none ; } |
3, prohibit multi-line text box textarea drag
In this way, add properties to the multiline text box cannot be dragged and zoomed out:
|
textarea { resize: none ; } |
Here to mention a property resize, this is the CSS3 property, for element scaling, it can take the following values:
None Default Value
Both allows horizontal and vertical scaling
Horizontal only allows horizontal scaling
Vertical only allows zooming in the vertical direction
Not only for TEXTAREA elements, for most of the elements are applicable, such as Div, and so on, not listed here, but unlike textarea, the use of the div need to add a sentence overflow:auto, that is, the effect:
|
div { resize: both ; overflow : auto ; } |
Use CSS to remove the default fillet style for buttons on IPhone pages