css - 从 Wikipedia Print Preview 中删除超链接下划线
问题描述
我想打印来自维基百科的一些文章,但我想从打印的所有单词中删除超链接下划线。
我正在使用 Wikipedia Account User Scripts Custom CSS删除链接,但无法使其正常工作,下划线仍显示在 Chrome 的打印预览中。我创建了一个维基百科vector.css
主题覆盖,并清除了浏览器缓存,但我不知道 CSS 是否正在应用。
/* Remove Hyperlinks */
@media print {
a:link {text-decoration: none !important;}
a[href]:after {content: none !important;}
}
维基百科帐户小工具打印选项
我还使用小工具打印选项来删除其他元素,例如参考编号链接。
铬打印视图
以及 Chrome 的打印预览功能,可以重新格式化页面以进行打印。
您可以在此处看到预览中的链接下划线。
解决方案
将Chrome 的渲染切换为打印,您会看到他们在使用border-bottom
. 你也需要敲掉它:
/* Remove Hyperlinks */
@media print {
a:link {
border-bottom: none !important;
text-decoration: none !important;
}
a[href]:after {
content: none !important;
}
}
推荐阅读
- webpack - 带有 preact-cli 和 ssr 的 unistore
- javascript - React.JS 奇怪的错误:按钮随滚动而移动
- python - 从python中的rss提要中提取以关键字/短语开头的句子
- html - UI设计(如何让它看起来很专业)
- excel - FindNext - VBA 代码测试正确,但 Excel 中的公式不起作用
- python-3.x - 从numpy数组中删除元素?
- java - 当我从服务器获取 html 文件或调用任何服务时,响应在 chrome 网络选项卡中包含红点,导致 HTML/JSON 中断
- reactjs - 如何使用 webpack 配置 create-react-app 以及它是如何运行测试的?
- forms - 使用 GlobalKey 进行验证
在 Flutter Stepper 小部件的各个步骤中即使输入正确也会返回 false - c# - Unity 中的持续射速