How to hide href attribute of tag via css when using window.print

后端 未结 2 906
迷失自我
迷失自我 2021-01-06 09:57

I\'ve a php page, with a button that able the user to print via window.print function.

I\'d need to know how to hide the href attribute of an html tag when printing

相关标签:
2条回答
  • 2021-01-06 10:31

    Thank you, the solution i've found that work form me is similar to your

       #section_to_print a[href]:after { display:none; } 
    

    In fact, the problem was generated by some css containing a rule like follow:

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

    Like suggested at this link:

    stackoverflow.com/questions/4834517/…

    However, thank to much :) Regards

    0 讨论(0)
  • 2021-01-06 10:41

    why dont you use:

    #section_to_print a{
        color:black;
        text-decoration:none;
    }
    
    0 讨论(0)
提交回复
热议问题