-
-
Save patsuckow/9844f8ce6bb0e32e71782bd5379a8384 to your computer and use it in GitHub Desktop.
Нормальная форма выбора файла для Bootstrap4.0
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| HTML: | |
| ====== | |
| <div class="custom-file"> | |
| <input type="file" id="myfile" class="custom-file-input" onchange="$(this).next().after().text($(this).val().split('\\').slice(-1)[0])"> | |
| <label class="custom-file-label" for="customFile">Выберите файл</label> | |
| </div> | |
| CSS: | |
| ====== | |
| .custom-file-label::after{ | |
| content: 'Обзор'; | |
| } | |
| Обрезает весь путь и выводит только имя и расширение файла в строке выбора. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
А можно поменять текст "Выбор файла" и "Не выбран ни один файл"?