Home > Article > Web Front-end > How to Prevent Links from Printing with Their Href Values in Chrome?
Printing Without Href Values in Chrome
When attempting to customize the CSS for printing, you may encounter an issue where links are printed with their href values. This is the case in Chrome. For example, if you have the following HTML:
<a href="http://www.google.com">Google</a>
It will print as:
Google (http://www.google.com)
To resolve this and print only the link text, you can make use of the following CSS snippet for your printing stylesheet:
@media print { a[href]:after { content: none !important; } }
This will override the default behavior of Bootstrap and print links without their href values.
The above is the detailed content of How to Prevent Links from Printing with Their Href Values in Chrome?. For more information, please follow other related articles on the PHP Chinese website!