How do I hide an element when printing a web page?

前端 未结 10 1057
-上瘾入骨i
-上瘾入骨i 2020-11-22 03:34

I have a link on my webpage to print the webpage. However, the link is also visible in the printout itself.

Is there javascript or HTML code which would hide the lin

10条回答
  •  攒了一身酷
    2020-11-22 04:17

    The best thing to do is to create a "print-only" version of the page.

    Oh, wait... this isn't 1999 anymore. Use a print CSS with "display: none".

提交回复
热议问题