Turn off iPhone/Safari input element rounding

前端 未结 11 1265
时光取名叫无心
时光取名叫无心 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:52

    If you use normalize.css, that stylesheet will do something like input[type="search"] { -webkit-appearance: textfield; }.

    This has a higher specificity than a single class selector like .foo, so be aware that you then can't do just .my-field { -webkit-appearance: none; }. If you have no better way to achieve the right specificity, this will help:

    .my-field { -webkit-appearance: none !important; }

提交回复
热议问题