Suppressing HREF Values in Chrome Printouts
When customizing print styles in Chrome, you may encounter an issue where links are printed with both their text and their HREF values. This can be distracting and aesthetically unappealing.
To resolve this issue, consider the following solutions:
Bootstrap's Print Media Rule
Bootstrap, a popular CSS framework, includes a print media rule that appends HREF values to links. To disable this behavior:
<code class="css">@media print { a[href]:after { content: none !important; } }</code>
This will override Bootstrap's rule and prevent HREF values from being printed.
Custom CSS Override
Alternatively, you can create your own CSS rule to override the default behavior:
<code class="css">@media print { a[href]:after { content: none !important; } }</code>
Add this rule to your print stylesheet to suppress HREF values when printing in Chrome.
The above is the detailed content of How to Suppress HREF Values in Chrome Printouts?. For more information, please follow other related articles on the PHP Chinese website!