如何在下载链接周围创建轮廓或框?

huangapple go评论59阅读模式
英文:

How do I make an outline or box around a download link?

问题

我尝试在网上查找,但找不到任何信息。请帮忙!

我尝试了一些应该有效的方法,但它们没有起作用。

英文:

I tried looking online, but I couldn't find anything. Please help!

I tried some methods that were supposed to work, but they did not.

答案1

得分: 1

使用属性选择器并应用样式

a[download] {
  outline: 2px solid orange;
}
<a href="/foo.jpg" download>下载</a>
英文:

Use the attribute selector and apply the style

<!-- begin snippet: js hide: false console: true babel: false -->

<!-- language: lang-css -->

a[download] {
  outline: 2px solid orange;
}

<!-- language: lang-html -->

&lt;a href=&quot;/foo.jpg&quot; download&gt;Download&lt;/a&gt;

<!-- end snippet -->

huangapple
  • 本文由 发表于 2023年2月14日 04:27:42
  • 转载请务必保留本文链接:https://go.coder-hub.com/75440855.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定