我在想这是否可行?谷歌上没有相关信息。
基本上,我想让我的按钮在被选择时模拟,以允许用户上传文件。我已经阅读过使用标签是可能的,但我需要使用按钮来实现 UX/UI。
<button style="position:fixed;bottom:10px;right:70px" type="button" class="btn btn-default">
<input type="file" id="files" visbility="hidden" />
<span class="glyphicon glyphicon-folder-open" aria-hidden="true"></span>
</button>
当前我的按钮看起来像这样:,变成了这样:。
hidden
属性代替visbility="hidden"
,例如:<input type="file" id="files" hidden />
(https://www.w3schools.com/tags/att_global_hidden.asp) - cespon