如何删除Firefox中的日期和时间HTML输入的交叉 [英] How to remove cross on date and time HTML inputs in Firefox

查看:103
本文介绍了如何删除Firefox中的日期和时间HTML输入的交叉的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何隐藏自动出现在日期和时间类型HTML输入上的十字图标?

例如,

 < input type =time>< / input> 
pre>

用这样的十字显示。

,但无法使用Firefox。



只想删除那个十字,最好在所有的浏览器中。

最好的解决方案,我可以想出将剪辑输入字段外的图标,并删除边框,所以它不会看起来不好。这是我的意思:



< input type =time required />



注意,这不是一个完美的解决方案。它可能不适合你的情况,但我真的没有发现任何可以帮助你的东西,所以我认为这可能是值得分享的。


How do I hide the cross icon that automatically appears on date and time type HTML inputs?

eg.

<input type="time></input>

Shows with a cross like this.

I worked out how to do it for Chrome, but couldn't work out firefox.

Just want to remove that cross, preferably across all browsers.

解决方案

I've done some research and found nothing so far. The best Solution I could come up with would be to clip the icon outside the input field and removing the border so it wouldn't look that bad. Here's what I mean:

input[type="time"]{
  width:120px;
  border: none;
  clip-path: inset(0 17px 0 0);
  outline:none;
  outline:0;
}

<input type="time" required/>

Note, this is not a perfect solution. It might not even work for your case but I really didn't find anything else that could help you so I thought this might be worth sharing.

这篇关于如何删除Firefox中的日期和时间HTML输入的交叉的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆