Site icon DataFlair

Media Queries in CSS

Full Stack Web Development Courses with Real-time projects Start Now!!

Program 1

<html>
    <head>
        <style>
          /*body{
            background-color: aqua;
          }

          @media (max-width:600px)
          {
            body{
                background-color: aquamarine;
            }
          }*/
          @media (orientation:landscape)
            {
                body{
                    background-color: beige;
                }
            }

            @media(orientation:portrait)
            {
                body{
                    background-color: bisque;
                }
            }

        </style>
    </head>
    <body>
        
    </body>
</html>

 

Exit mobile version