文件
文件-Bootstrap 5和Material Design 2.0表格
文件输入是用户可以用来上传一个或多个文件(照片,文档或 其他任何文件类型)。
基本例子
文件输入是最讨厌的,如果需要,还需要其他JavaScript 喜欢用功能性 Choose file…和选定的文件名文本将它们连接起来。
<label class="form-label" for="customFile">Default file input example</label>
<input type="file" class="form-control" id="customFile" />
将 disabled
属性添加到 <input>
a习俗
标记将更新为显示为已禁用。
<label for="formFileDisabled" class="form-label">Disabled file input example</label>
<input class="form-control" type="file" id="formFileDisabled" disabled />
浆纱
您也可以从大小文件输入中进行选择,以匹配我们大小相似的文本输入。
<label for="formFileSm" class="form-label">Small file input example</label>
<input class="form-control form-control-sm" id="formFileSm" type="file" />
<label for="formFileLg" class="form-label">Large file input example</label>
<input class="form-control form-control-lg" id="formFileLg" type="file" />