是否有一种方法可以放置输入类型' file'单击图标
是否有任何方法将输入类型='file'放在我的代码示例中已有下载的SVG图标上。 我正在使用尾风CSS。
<td click.delegate="getTenantAgentLicence(agent.agentId)" class="p-6 pb-10 text-left block md:table-cell">
<!-- <input type="file"/> -->
<span class="inline-block md:hidden font-bold">Download</span>
<a class="ml-2 cursor-pointer">
<img class="h-6 w-6" src="/images/download1.svg">
</a>
</td>
Is there any way of putting input type='file' on svg Icon that I already have in my code example below Download.
I'm using Tailwind CSS.
<td click.delegate="getTenantAgentLicence(agent.agentId)" class="p-6 pb-10 text-left block md:table-cell">
<!-- <input type="file"/> -->
<span class="inline-block md:hidden font-bold">Download</span>
<a class="ml-2 cursor-pointer">
<img class="h-6 w-6" src="/images/download1.svg">
</a>
</td>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
更多
发布评论
评论(1)
将
&lt; input&gt;
和&lt; img&gt;
放入&lt; label&gt;
中。单击图像将与单击输入元素相同。然后隐藏&lt; input&gt;
。Put the
<input>
and the<img>
inside a<label>
. Clicking the image will be the same as clicking the input element. Then hide the<input>
.