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

来源:互联网 发布:杀蚊软件 编辑:程序博客网 时间:2024/06/05 05:57
一:要解决的问题时:在ie6-ie11下兼容以下透明上传文件按钮的效果。实现方式通过滤镜实现。

二:效果图如下:





三:代码:

样式:



[css] view plaincopy在CODE上查看代码片派生到我的代码片
01..file2 {  
02.        position: absolute;  
03.        -ms-filter: "progidXImageTransform.Microsoft.Alpha(Opacity=50)";/*ie 8*/  
04.        filter: alpha(opacity=0);/*ie 5-7*/  
05.        opacity:.0;/*opera9.0+,firefox1.5+,safari,chrome*/  
06.        width: 30px;  
07.        height: 20px;  
08.        line-height: 20px;  
09.        cursor: pointer;  
10.        padding: 0;  
11.        overflow: hidden;  
12.        padding-top: 0px;  
13.    }  




[css] view plaincopy在CODE上查看代码片派生到我的代码片
01.<pre class="html" name="code"><em style="width:30px; height:20px; line-height:20px;overflow:hidden; font-style:normal;">  
02.   <input type="file" class="file2" id="filep_${item.DM}" style="border:none;" onchange="upload(this,'${item.DM}');" />  
03.   <a href="javascript:void(0)" >上传</a>  
04.</em>  




[html] view plaincopy在CODE上查看代码片派生到我的代码片
01.<font style="color: gray;">删除</font>  
0 0
原创粉丝点击