英文:
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 -->
<a href="/foo.jpg" download>Download</a>
<!-- end snippet -->
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论