Set different font families for screen and print with CSS

CSSWeb DevelopmentFront End Technology

The following example specifies different font families for screen and print. 

The next CSS uses the same font size for both screens as well as a printer.

Example

<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>
raja
Published on 27-Apr-2018 15:45:32
Advertisements