IE, FireFox, Opera 浏览器支持CSS实现Alpha透明的方法 兼容问题

来源:互联网 发布:水厂泵站最优化问题 编辑:程序博客网 时间:2024/06/04 18:19

一:要解决的问题时:在ie6-ie11下兼容以下透明上传文件按钮的效果。实现方式通过滤镜实现。

二:效果图如下:

三:代码:

样式:

.file2 {position: absolute;-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";/*ie 8*/filter: alpha(opacity=0);/*ie 5-7*/opacity:.0;/*opera9.0+,firefox1.5+,safari,chrome*/width: 30px;height: 20px;line-height: 20px;cursor: pointer;padding: 0;overflow: hidden;padding-top: 0px;}
<pre class="html" name="code"><em style="width:30px; height:20px; line-height:20px;overflow:hidden; font-style:normal;">   <input type="file" class="file2" id="filep_${item.DM}" style="border:none;" onchange="upload(this,'${item.DM}');" />   <a href="javascript:void(0)" >上传</a></em>
<font style="color: gray;">删除</font>



1 0
原创粉丝点击