我需要在我的表单中添加一些自定义的<input type=“file”>
我尝试使用此代码
<div id="upload-file-container">
<input type="file" name="pic[]" class="photo" value="Add photo" />
</div>
CSS
#upload-file-container {
position: relative;
width: 50px;
height: 20px;
overflow: hidden;
}
#upload-file-container input {
position: absolute;
left: 0;
top: 0;
font-size: 20px;
opacity: 0;
margin: 0;
padding: 0;
border: none;
width: 50px;
height: 20px;
}
但我的输入只是变得不可见。
http://jsfiddle.net/FXTCg/4/
如何使输入标题可见“添加照片”?