删除输入中的 X 按钮 - Metro [英] Remove X button in input - Metro

查看:23
本文介绍了删除输入中的 X 按钮 - Metro的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用 Javascript 编写了一个 Metro 程序.问题是 Windows8 会自动为其添加一个 X 按钮.现在如何编辑或删除该按钮?下面是我的布局,X 按钮与电子邮件输入重叠.

I write a Metro program in Javascript. The problem is Windows8 automatically adds an X button to it. Now how to edit or remove that button? Below is my layout, the X button overlaps the email input.

推荐答案

详情在这里:http://msdn.microsoft.com/en-us/library/windows/apps/hh465498.aspx

您需要使用 -ms-clear 伪元素,并根据需要设置样式,或者不显示它:

You need to use the -ms-clear pseudo element, and style it either as you need it, or display none it:

input::-ms-clear {
    display: none;
}

请注意,您可能不想显示任何内容,因为这会删除删除当前输入的易于触摸的 X.

Note that you likely want to not display none it, since this removes the easy-to-touch X that removes the current input.

这篇关于删除输入中的 X 按钮 - Metro的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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