我有这样的代码:标签不起作用
.hidden_element {
height: 1px;
width: 1px;
overflow: hidden;
}
<form action="">
<label for="file">
<button type="button" class="button red">Choose File</button>
</label>
<div class="hidden_element">
<input type="file" name="video" id="file" />
</div>
</form>
问题是,当我点击选择文件没有任何反应。
此按钮不执行任何操作。你想要它做什么?你为什么要把它放入标签? –
应该发生什么? – Stralos
您正在隐藏上传文件的输入类型。 –