Html Bootstrap 浏览文件按钮样式

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/33664107/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-29 18:28:35  来源:igfitidea点击:

Bootstrap Browse File Button Style

htmlcsstwitter-bootstrap

提问by Avan CaiJun

I have a question. I have a bootstrap input with type of file:

我有个问题。我有一个文件类型的引导程序输入:

Html code:

html代码:

input id="fileUpload" class="form-control" name="FileUpload" multiple="" type="file"  

However it turns out to be that the "browse" button is being cropped. I would like to ask if it is possible or how to change the size of the "browse" button using html or css.

然而,事实证明“浏览”按钮正在被裁剪。我想问一下是否有可能或如何使用 html 或 css 更改“浏览”按钮的大小。

enter image description here

在此处输入图片说明

回答by user2624242

<input id="fileUpload" name="FileUpload" multiple="" type="file" /> 

If you would like to keep your fileupload as button please look at this Twitter Bootstrap Form File Element upload button

如果您想将文件上传保留为按钮,请查看此 Twitter Bootstrap 表单文件元素上传按钮