我的页面包含多张图片:
<a class="fancybox" href="img/16.jpg"><img src="img/16.jpg" class="center-block img-responsive"></a>
当我打印页面(chrome)时,href 在每个图像的底部可见。
那么,如何隐藏每张图片底部打印的操作链接?
例如,当我将“隐藏打印”类应用于操作 block 时,我的图像就消失了......
最佳答案
我无法在 Chrome 上重现该问题,所以我猜这不是因为 anchor 标记。正如 jackson 已经说过的,你可能会,
a:after {
content: " (" attr(href) ")";
}
在您的任何 css 框架中(如果您使用过的话)。
if you're using Twitter Bootstrap as a framework, this will work for you(from https://stackoverflow.com/a/14931127/3556874):
a[href]:after{
content:"";
}
If you are not sure , where is it written or if you can not change the external css, you will also require to consider the
:before
pseudo class
@media print{
a[href]:after{
content:"";
}
a[href]:before{
content:"";
}
}
关于css - 如何隐藏每张图像底部打印的操作链接,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28561419/