我想打印维基百科的一些文章,但我想删除打印中所有单词的超链接下划线。
我正在使用维基百科帐户User Scripts Custom CSS删除链接,但无法使其正常工作,下划线仍然显示在 Chrome 的打印预览中。我创建了一个 Wikipedia vector.css
主题覆盖,并清除了浏览器缓存,但我无法判断 CSS 是否正在应用。
/* Remove Hyperlinks */
@media print {
a:link {text-decoration: none !important;}
a[href]:after {content: none !important;}
}
维基百科帐户小工具打印选项
我也在使用Gadgets Print Options删除其他元素,例如引用号链接。
Chrome 打印 View
Chrome 的打印预览功能可重新格式化页面以进行打印。
您可以在此处看到预览中带有下划线的链接。
最佳答案
切换Chrome's rendering to print你会发现他们用 border-bottom
作弊。您还需要消除它:
/* Remove Hyperlinks */
@media print {
a:link {
border-bottom: none !important;
text-decoration: none !important;
}
a[href]:after {
content: none !important;
}
}
关于css - 从维基百科打印预览中删除超链接下划线,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56511520/