我有一个文件输入按钮,而不是浏览我想在那里显示字体真棒上传图标,但无论我什么都没有给我结果。如何添加字体真棒图标到文件输入字段
这里是我试过:
.select-wrapper {
background: url(http://s10.postimg.org/4rc0fv8jt/camera.png) no-repeat;
background-size: cover;
display: block;
position: relative;
width: 33px;
height: 26px;
}
#image_src {
width: 26px;
height: 26px;
margin-right: 100px;
opacity: 0;
filter: alpha(opacity=0); /* IE 5-7 */
}
<div class="container">
<span class="select-wrapper">
<input type="file" name="image_src" id="image_src" />
</span>
</div>
通过上面的代码我只得到一张照片,而不是浏览按钮,但我想用字体真棒图标。
@JacobGray我试过在输入类中添加图标类 –
喜欢这个? http://stackoverflow.com/a/30858367/483779 – Stickers
@Pangloss我试过但没有结果来了 –