gpt4 book ai didi

html - 将输入文件隐藏在按钮中 Semantic-UI

转载 作者:技术小花猫 更新时间:2023-10-29 11:51:55 25 4
gpt4 key购买 nike

有没有办法使用 Semantic-ui 来完成这项工作?

我有这个按钮,看起来不错,但输入文件永远不会被调用。

<div class="ui icon big button">
<i class="cloud icon"></i>
<input type="file" id="hidde-new-file" style="display: none">
</div>

最佳答案

我建议添加一个指向隐藏输入的标签。单击标签时会触发其输入。全原生无JS。

<div>
<label for="hidden-new-file" class="ui icon button">
<i class="cloud icon"></i>
Open File
</label>
<input type="file" id="hidden-new-file" style="display: none">
</div>

关于html - 将输入文件隐藏在按钮中 Semantic-UI,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30797776/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com