您的位置:首页 > 其它

如何用图片按钮来代替文件上传控件

2013-04-09 17:53 155 查看
点击图片时,弹出窗口,让上传文件

<style type="text/css">

.fileInputContainer{
height:256px;
background:url(http://images.cnblogs.com/cnblogs_com/dreamback/437546/o_ff6.png);
position:relative;
width: 256px;
}
.fileInput{
height:256px;
font-size: 300px;
position:absolute;
right:0;
top:0;
opacity: 0;
filter:alpha(opacity=0);
cursor:pointer;
}

</style>
<div class="fileInputContainer">
<input class="fileInput" type="file" name="" id="" />
</div>


实现原理是:用图片盖住input上传文件控件。

保留住,以后可能会用到。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐