打印网站而不打印链接位置? [英] Print a website without printing the link locations?

查看:136
本文介绍了打印网站而不打印链接位置?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用简单的window.print()调用导航器打印函数;呼叫。它打印完美(我想打印相同的我在屏幕上看到,所以我不真的使用特殊的CSS打印),但它显示链接位置旁边的文本链接,像:

I'm invoking the navigator print function using a simple window.print(); call. It prints perfect (I want to print the same I see on the screen, so I don't really use a special CSS to print) but it showing the link locations next to the text link, something like:

    Homepage (http://localhost)

要清楚:我不想在链接附近的链接位置在打印版本,我可以控制CSS,但我找不到这个行为定义在任何地方,所以我认为是一个导航器相关问题!

To be clearer: I don't want to have the link locations near the links in the printed version, I have control over the CSS but I can't find this behaviour defined anywhere, so I think is a navigator-related issue!

编辑:
这发生在Firefox 3.6.8和最后一个Chrome,在Ubuntu的Windows XP / Vista。

This happens under Firefox 3.6.8 and the last Chrome, on Ubuntu an Windows XP/Vista.

推荐答案

似乎您正在使用符合CSS2规范的浏览器打印此样式的网页

Seems you are printing a page with this styling from a CSS2 compliant browser

a href =http://www.alistapart.com/articles/goingtoprint/ =nofollow noreferrer> http://www.alistapart.com/articles/goingtoprint/

http://www.alistapart.com/articles/goingtoprint/


在完全符合CSS2的浏览器中,我们
可以在每个链接后面插入
的URL,从而使
对于有
副本的打印输出和web浏览器
方便的任何人都是相当有用的。这里是规则,
将此效果限制为内容
div,因此避免在
标头中附加网址:

In a fully CSS2-conformant browser, we can parenthetically insert the URLs of the links after each one, thus making them fairly useful to anyone who has a copy of the printout and a web browser handy. Here’s the rule, which restricts this effect to the "content" div and thus avoids sticking a URL in the masthead:



#content a:link:after, #content a:visited:after {    
  content: " ("attr(href) ") ";    
  font-size: 90%;   
}




在基于Gecko的浏览器,
like Mozilla或Netscape 6.x.
打印输出中的每个链接后,您应该
查看
括号中的链接的URL。

Try it out in a Gecko-based browser, like Mozilla or Netscape 6.x. After every link in the printout, you should see the URL of the link in parentheses.

这篇关于打印网站而不打印链接位置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆