在Chrome中打印时需要删除href值 [英] Need to remove href values when printing in Chrome
本文介绍了在Chrome中打印时需要删除href值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我试图自定义打印CSS,并发现它打印链接与 href
值以及链接。
这是在Chrome中。
对于此HTML:
< a href =http://www.google.com> Google< / a>
打印:
Google(http://www.google.com)
我想打印:
Google
$引导程序做同样的事情(...如下面的选择的答案)。 p>
@media print {
a [href]:after {
content:(attr );
}
}
只要从中移除即可自己的打印样式表:
@media print {
a [href]:after {
content:none!重要;
}
}
I'm attempting to customize the print CSS, and finding that it prints links out with the href
value as well as the link.
This is in Chrome.
For this HTML:
<a href="http://www.google.com">Google</a>
It prints:
Google (http://www.google.com)
And I want it to print:
Google
解决方案 Bootstrap does the same thing (... as the selected answer below).
@media print {
a[href]:after {
content: " (" attr(href) ")";
}
}
Just remove it from there, or override it in your own print stylesheet:
@media print {
a[href]:after {
content: none !important;
}
}
这篇关于在Chrome中打印时需要删除href值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文