css - 从维基百科打印预览中删除超链接下划线

标签 css printing wikipedia

我想打印维基百科的一些文章,但我想删除打印中所有单词的超链接下划线。


我正在使用维基百科帐户User Scripts Custom CSS删除链接,但无法使其正常工作,下划线仍然显示在 Chrome 的打印预览中。我创建了一个 Wikipedia vector.css 主题覆盖,并清除了浏览器缓存,但我无法判断 CSS 是否正在应用。

Custom CSS

/* Remove Hyperlinks */
@media print {
    a:link {text-decoration: none !important;}
    a[href]:after {content: none !important;}
}

维基百科帐户小工具打印选项

我也在使用Gadgets Print Options删除其他元素,例如引用号链接。

Wikipedia Print Options


Chrome 打印 View

Chrome 的打印预览功能可重新格式化页面以进行打印。

您可以在此处看到预览中带有下划线的链接。

Chrome Print View

最佳答案

切换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/

相关文章:

iphone - Google Chart API 在 iPhone 上突破容器

c - 关于C中的指针运算

wikipedia - 使用 MediaWiki API 获取维基百科数学表达式

sql - 维基百科图形数据库插入

html - 如何去掉 Bootstrap/Wordpress 中的导航菜单边距?

javascript - 下拉选择图片

python - 在 Python 3.2 中更改单个打印行的颜色?

python - 从维基百科表格中提取数据(剧集标题)

html - 媒体查询设备宽度或分辨率

Perl 打印不正确