`

自定义的文件上传样式~

    博客分类:
  • CSS
阅读更多
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=gb2312"/>
<title>上传测试</title>
<style>
.input-file{
position: absolute;
right: 0;
top: 0;
_font-size: 100px;
_font-size: 12px;
_zoom: 1;
height: 20px;
_height: auto;
opacity: 0;
filter: alpha(opacity=0);
-ms-filter: "alpha(opacity=0)";
cursor: pointer;
}

.upload-button {
/*嘘。。。这个效果是从饭否学习而来的。 我是饭否重度用户~ 咩哈哈~ */
background: transparent url(http://static2.fanfou.com/img/uploadicon.png) no-repeat 0 0;
cursor: pointer;
margin: 0;
padding: 0;
text-align: center;
text-indent: -9999px;
width: 20px;
height: 20px;
position: relative;
}

</style>
</head>
<body>
<div class="upload-button">
<input title="上传图片,最大2MB" class="input-file" type="file" name="picture" id="upload-file" />
</div>
</body>
</html>

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics