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

一:要解决的问题时:在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>





郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。