如何将<路径 d= " " >转换为按钮/超链接?



我这里有一段代码,

<path d="M439.296,84.91c-1.024,0-2.56-0.512-4.096-0.512H112.64l-5.12-34.304C104.448,27.566,84.992,10.67,61.952,10.67H20.48 C9.216,10.67,0,19.886,0,31.15c0,11.264,9.216,20.48,20.48,20.48h41.472c2.56,0,4.608,2.048,5.12,4.608l31.744,216.064 c4.096,27.136,27.648,47.616,55.296,47.616h212.992c26.624,0,49.664-18.944,55.296-45.056l33.28-166.4 C457.728,97.71,450.56,86.958,439.296,84.91z"  />

并且它应该显示一个图标,我如何将其转换为超链接/按钮?

<path>封装在<a>标记中。示例:

<a href="link">
<path d="…">
</a>

如果您想使用按钮,请使用<button>标签

然后你需要用这个css规则禁用下划线:text-decoration:none你可以直接在<a>标签中应用它:<a href="link" style="text-decoration:none">

相关内容

  • 没有找到相关文章

最新更新