html - Chrome 浏览器的不透明度

标签 html css cross-browser opacity

我需要在 Chrome 中设置 HTML input type= "file"对象的不透明度。 在 IE 中,它看起来很完美,因为我使用了如下过滤器:

 style="position: absolute; filter: progid:DXImageTransform.Microsoft.Alpha(style=0, opacity=0);

同样需要为 Chrome 做。谁能建议我如何使用 chrome 的不透明度过滤器? How it looks in 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:0Opacity 属性取值从 0 到 1,其中 filter:Alpha 取值从 0 到 100

关于html - Chrome 浏览器的不透明度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23629494/

相关文章:

html - 如何 3D 旋转 'a' 标签?

css - 浏览器默认 css 中不同样式的 HTML 元素是网站不同浏览器中不同外观的唯一因素吗?

cross-browser - Chrome 中的 CSS 像素完美

html - 动态网址索引

html - Zurb Foundation 框架无法正常工作

html - 在本地测试博客?

html - 创建一列父高度

html - 如何使按钮居中并使它们大小相同

javascript - 将 `div` 的宽度设置为 window.innerWidth 导致垂直 slider

css3 元素在 IE9 上不起作用