Home >Web Front-end >CSS Tutorial >Use CSS to set different font families for screen and print
The following example specifies different font families for screen and print.
The next CSS uses the same font size on screen and printer.
<style> <!-- @media screen { p.bodyText {font-family:verdana, arial, sans-serif;} } @media print { p.bodyText {font-family:georgia, times, serif;} } @media screen, print { p.bodyText {font-size:10pt} } --> </style>
The above is the detailed content of Use CSS to set different font families for screen and print. For more information, please follow other related articles on the PHP Chinese website!