是否无法使用类似于Bootstrap 4的CSS更改Bootstrap 5中输入文件的Choose文件文本?
以及如何向";未选择文件添加页边距?
Bootstrap 5 Beta版不再提供使用伪元素覆盖browser's file input defaults的custom file input like Bootstrap 4。因此,您必须使用JS或创建自己的psuedo元素来隐藏Choose file
..输入区域...
#formFile::before {
content: "Pick file";
position: absolute;
z-index: 2;
display: block;
background-color: #eee;
width: 80px;
}
这篇关于如何使用Bootstrap 5更改选择文件和文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持吉威生活!
[英文标题]How to change "Choose file" text using Bootstrap 5
声明:本媒体部分图片、文章来源于网络,版权归原作者所有,如有侵权,请联系QQ:330946442删除。