Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSS

css3, media queries cheatSheet

<!DOCTYPE html>
<html lang="en-US">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0" />
    <title>test</title>
    <style type="text/css">
      h3 {
        text-align: center;
      }

      /* PRINT VERSION */
      @media print {
        h3:after {
          content: ' - PRINT';
          display: inline;
        }
      }
      /* PHONE VERSION */
      @media only screen and (min-width: 320px) {
        h3:after {
          content: ' - PHONE';
          display: inline;
        }
      }
      /* TABLET VERSION */
      @media only screen and (min-width: 768px) {
        h3:after {
          content: ' - TABLET';
          display: inline;
        }
      }
      /* DESKTOP VERSION */
      @media only screen and (min-width: 980px) {
        h3:after {
          content: ' - DESKTOP';
          display: inline;
        }
      }
    </style>
  </head>
  <body>
    <h3>TEST</h3>
  </body>
</html>
Source by mac-blog.org.ua #
 
PREVIOUS NEXT
Tagged: #media #queries #cheatSheet
ADD COMMENT
Topic
Name
3+4 =