点击图片,上传文件样式

<html>
<head>
<title>input file</title>
<style>
.wrapper{position: absolute;top: 50px;left: 400px;width: 35px;height: 31px;overflow: hidden;}
.spanStyle{background-image: url(1.JPG);display: inline-block;width: 35px;height: 31px;position: absolute;}
.inputStyle{cursor: pointer;position: absolute;right: 0px;}
</style>
</head>
<body>
<div class="wrapper">
<span class="spanStyle"></span>
<input type="file" class="inputStyle"/>
</div>
</body>
</html> 

input file分两部分,前半部分是是一个按钮后半部分是一个文本,如果加样式只在后半部分起作用。

posted @ 2013-10-10 11:17  海边菩提  阅读(347)  评论(0编辑  收藏  举报