Home > Web Front-end > CSS Tutorial > How to remove iPhone/Safari input element rounding?

How to remove iPhone/Safari input element rounding?

Patricia Arquette
Release: 2024-10-30 15:28:26
Original
1074 people have browsed it

How to remove iPhone/Safari input element rounding?

Turn off iPhone/Safari Input Element Rounding

Input elements, such as text fields, often have a rounded style when rendered on Safari for iOS devices. This may conflict with the desired aesthetics of a website. Fortunately, there are CSS solutions to remove this rounding.

iOS 5 and Later

On iOS 5 and later versions, the following CSS can be applied to eliminate input field rounding:

<code class="css">input {
  border-radius: 0;
}

input[type="search"] {
  -webkit-appearance: none;
}</code>
Copy after login

If platform-specific removal is necessary, the -webkit-border-radius property can be used instead:

<code class="css">input {
    -webkit-border-radius: 0;
}</code>
Copy after login

Legacy Versions

For older versions of iOS, the -webkit-appearance: none property was used:

<code class="css">input {
    -webkit-appearance: none;
}</code>
Copy after login

The above is the detailed content of How to remove iPhone/Safari input element rounding?. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template