如何隐藏默认选择文件按钮 [英] How to hide default choose file button

查看:106
本文介绍了如何隐藏默认选择文件按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何隐藏默认的选择文件按钮?



这里是我的html:

 < div class =col-md-4> 
< span class =btn btn-info>< i class =glyphicon glyphicon-plus> < / i>浏览
< input type =filestyle =position:relative; overflow:hiddenid =inPutArtistImagename =ArtistImageaccept =image / png,image / jpeg/>
< / span>
< / div>

按钮的样式与bootsrap按钮信息颜色和加号图标很相似。



我根本无法摆脱灰色的选择文件按钮。

解决方案



请考虑使用 Jasny Bootstrap的文件输入小部件,而不是实现自己的。


How can I hide the default choose file button ?

Here is my html:

<div class="col-md-4">                           
    <span class="btn btn-info "><i class="glyphicon glyphicon-plus"> </i> Browse
        <input type="file" style="position:relative;overflow:hidden" id="inPutArtistImage" name="ArtistImage" accept="image/png, image/jpeg" />
    </span>
</div>

The button is styled nicely with bootsrap button info colors and the plus icon.

I simply cannot get rid of the grey "Choose file" button. Any help is appreciated.

I have tried every solution on StackOverflow

解决方案

Consider using Jasny Bootstrap's file input widget instead of implementing your own.

这篇关于如何隐藏默认选择文件按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆