Turn off iPhone/Safari input element rounding

前端 未结 11 1187
时光取名叫无心
时光取名叫无心 2020-11-28 17:06

My website renders well on the iPhone/Safari browser, with one exception: My text input fields have a weird rounded style which doesn\'t look good at all with the rest of my

相关标签:
11条回答
  • 2020-11-28 17:54

    I had the same problem but only for the submit button. Needed to remove the inner shadow and rounded corners -

    input[type="submit"] { -webkit-appearance:none; -webkit-border-radius:0; }
    
    0 讨论(0)
  • 2020-11-28 17:57

    Please Try This one:

    Try Adding input Css like this:

     -webkit-appearance: none;
           border-radius: 0;
    
    0 讨论(0)
  • 2020-11-28 18:06

    It is the best way to remove the rounded in IOS.

    textarea,
    input[type="text"],
    input[type="button"],
    input[type="submit"] {
         -webkit-appearance: none;
         border-radius: 0;
    }
    

    Note: Please don't use this code for the Select Option. It will have problem on our select.

    0 讨论(0)
  • 2020-11-28 18:09

    input -webkit-appearance: none; alone does not work.

    Try adding -webkit-border-radius:0px; in addition.

    0 讨论(0)
  • 2020-11-28 18:11

    On iOS 5 and later:

    input {
      border-radius: 0;
    }
    
    input[type="search"] {
      -webkit-appearance: none;
    }
    

    If you must only remove the rounded corners on iOS or otherwise for some reason cannot normalize rounded corners across platforms, use input { -webkit-border-radius: 0; } property instead, which is still supported. Of course do note that Apple can choose to drop support for the prefixed property at any time, but considering their other platform-specific CSS features chances are they'll keep it around.

    On legacy versions you had to set -webkit-appearance: none instead:

    input {
        -webkit-appearance: none;
    }
    
    0 讨论(0)
提交回复
热议问题