使用 bootstrap4 输入空白自定义文件
Blank custom file input using bootstrap4
我正在尝试使用 bootstrap4 alpha 6 实现自定义文件输入,但添加后出现空白部分,如下所示:
<label class="custom-file">
<input type="file" id="file" class="custom-file-input">
<span class="custom-file-control"></span>
</label>
Bootstrap4 file browser documentation
我应该在此实现中添加任何 CSS 样式吗?
如文档中所述,占位符和按钮设置在 CSS:
.custom-file-control::after {
content: "Select file...";
}
.custom-file-control::before {
content: "Click me";
}
http://www.codeply.com/go/jcnmleDWja
此外,您可以在 HTML 文档中使用语言声明。例如,
<html lang="en"></html>
并为每种语言设置特定的样式...
.custom-file-control:lang(en)::after {
content: "Select file...";
}
.custom-file-control:lang(en)::before {
content: "Click me";
}
我正在尝试使用 bootstrap4 alpha 6 实现自定义文件输入,但添加后出现空白部分,如下所示:
<label class="custom-file">
<input type="file" id="file" class="custom-file-input">
<span class="custom-file-control"></span>
</label>
Bootstrap4 file browser documentation
我应该在此实现中添加任何 CSS 样式吗?
如文档中所述,占位符和按钮设置在 CSS:
.custom-file-control::after {
content: "Select file...";
}
.custom-file-control::before {
content: "Click me";
}
http://www.codeply.com/go/jcnmleDWja
此外,您可以在 HTML 文档中使用语言声明。例如,
<html lang="en"></html>
并为每种语言设置特定的样式...
.custom-file-control:lang(en)::after {
content: "Select file...";
}
.custom-file-control:lang(en)::before {
content: "Click me";
}