Preventing print icon getting printed
H开发者_如何学Pythonow to prevent print icon getting printed HTML
inside your head tag:
<link rel="stylesheet" href="print.css" media="print" />
in print.css:
a#print-icon { visibility: hidden; }
(I don't know the actual selector as you didn't post your HTML. Please post your code in future questions. Have fun!)
Use the @media CSS selector. Simplified example:
<style rel="stylesheet" href="somestyle.css" />
<img src="/some/file.png" class="print_me_not" />
in somestyle.css:
@media print {
.print_me_not {
display:none;
}
}
Use CSS Media Types.
Example:
<style type="text/css">
@media print {
#yourPrintIcon { display: none; }
}
</style>
another method: in your main css file:
@media print {
#printerIcon { display: none; }
}
精彩评论