webkit
I love all of the (relatively) new HTML5 INPUT
element types. If you aren't using them...what the hell is wrong with you?! please do. New types like search
and email
make these form fields infinitely more usable on mobile. What I don't necessarily like is how WebKit adds the circular x
button to the right of search boxes; they add a design element that was clashing with the site look and feel. After a quick search, I figured out how to remove it:
我喜欢所有(相对)新HTML5 INPUT
元素类型。 如果您不使用它们... 你到底怎么了?! 请做。 诸如search
和email
类的新类型使这些表单字段在移动设备上无限可用。 我不一定喜欢WebKit如何在搜索框右侧添加圆形的x
按钮。 他们添加了与网站外观冲突的设计元素。 快速搜索之后 ,我想出了如何删除它:
input[type='search']::-webkit-search-decoration,
input[type='search']::-webkit-search-cancel-button,
input[type='search']::-webkit-search-results-button,
input[type='search']::-webkit-search-results-decoration {
display: none;
}
No more unwanted icon in my design. Big thanks to Chris Coyier for this tip!
我的设计中不再有不需要的图标。 非常感谢Chris Coyier的提示!
翻译自: https://davidwalsh.name/remove-search-box-buttons-webkit
webkit