webkit_删除WebKit中的搜索框按钮

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元素类型。 如果您不使用它们... 你到底怎么了?! 请做。 诸如searchemail类的新类型使这些表单字段在移动设备上无限可用。 我不一定喜欢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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值