我需要在 Chrome 中设置 HTML input type= "file"对象的不透明度。 在 IE 中,它看起来很完美,因为我使用了如下过滤器:
style="position: absolute; filter: progid:DXImageTransform.Microsoft.Alpha(style=0, opacity=0);
同样需要为 Chrome 做。谁能建议我如何使用 chrome 的不透明度过滤器?
所以我需要从屏幕上隐藏这个“选择文件”。我选择了 width=70px 这样它就可以在更大的部分点击。 这是我正在使用的输入类型:
<input type="file" name="AttachLink" style="position: absolute; filter: progid:DXImageTransform.Microsoft.Alpha(style=0, opacity=0); imgobject.style.opacity=0; width:70px; height:50px; cursor: hand; left:-26px;" title="Add File Attachment" onChange="getWeblink();" size="40" float="right">
最佳答案
使用 css 的 Opacity
属性。您必须为您的场景使用 opacity:0
。 Opacity
属性取值从 0 到 1
,其中 filter:Alpha
取值从 0 到 100
。
关于html - Chrome 浏览器的不透明度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23629494/