CSS @media rule

CSSWeb DevelopmentFront End Technology

The @media rule specifies the target media types (separated by commas) of a set of rules.

Example

Let us see an example of @media rule −

<style>
   <!--
      @media print {
         body { font-size: 10pt }
      }

      @media screen {
         body { font-size: 12pt }
      }

      @media screen, print {
         body { line-height: 1.2 }
      }

   -->
</style>
raja
Published on 27-Apr-2018 13:11:37
Advertisements