在css中,如何去除input标签的默认样式?

html-css09

在css中,如何去除input标签的默认样式?,第1张

input{-webkit-appearance: none -moz-appearance: none -o-appearance: none appearance: none}

去除input的默认样式用上边的代码就可以实现了。

如果是只去除部分input的默认样式您可以使用class或ID来指定。

第一种:直接在input中加style=“outline:none”

[css] view plain copy

<input type="search" style="outline:none:>

第二种方式:在顶部style中直接控制css样式:

[css] view plain copy