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

<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>

 

posted @ 2015-09-10 09:33  hlb  阅读(349)  评论(0编辑  收藏  举报