自定义button上传按钮

<div class="upload_files">
    <input type="file" class="upload_icon" value="上传文件">
    <i></i>
    <p></p>
</div>
.upload_files{
  position: relative;
  overflow: hidden;  
}
.upload_icon{
   position:absolute;
   display:block;
   outline:none;
   filter:alpha(opacity=0);
   -moz-opacity:0;
   opacity:0;
   z-index:999;
   width:250px;
   height: 50px;
   font-size:100px;
}
.upload_icon + i{
  display:block;
  float:left;
  width:260px;
  height: 50px;
  background:  url();
  margin-top:-2px;
  cursor:pointer;
}

 

posted @ 2017-03-02 12:16  letitia_blog  阅读(465)  评论(0编辑  收藏  举报