How to change choose file text bootstrap 5

限于喜欢 提交于 2021-01-29 09:16:43

问题


Is it impossible change choose file text of input file in bootstrap 5 using css like bootstrap 4? and how can I add a margin to no file chosed?


回答1:


Bootstrap 5 beta no longer provides a custom file input like Bootstrap 4 that used pseudo elements to override the browser's file input defaults. Therefore you'd have to use JS or make your own psuedo element to hide the Choose file.. area of the input...

#formFile::before {
  content: "Pick file";
  position: absolute;
  z-index: 2;
  display: block;
  background-color: #eee;
  width: 80px;
}

https://codeply.com/p/2SHtFYxUcK



来源:https://stackoverflow.com/questions/65770908/how-to-change-choose-file-text-bootstrap-5

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!