Home > Web Front-end > CSS Tutorial > How to Disable Input Element Rounding in Safari?

How to Disable Input Element Rounding in Safari?

DDD
Release: 2024-10-30 17:56:31
Original
640 people have browsed it

How to Disable Input Element Rounding in Safari?

Disable Input Element Rounding in Safari

When developing websites for the iPhone and Safari browser, you may encounter an issue where text input fields exhibit a distractingly rounded appearance that conflicts with the website's overall design.

To rectify this issue and render the input fields as the intended rectangular shape, instruct Safari using the following CSS code:

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

For input fields designated for search purposes, utilize the following additional CSS:

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

If isolating the rounding removal to iOS devices is necessary, employ the -webkit-border-radius: 0; property. However, be aware that Apple may cease supporting prefixed properties in the future.

For older versions of iOS, use -webkit-appearance: none; instead:

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

The above is the detailed content of How to Disable Input Element Rounding in Safari?. 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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template