Advertisement
deyanivanov966

Упражнение 1.1 Банков

Dec 12th, 2021
672
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <html>
  2. <head>
  3.     <meta name="viewport" content="width=device-width, initial-scale=1.0">
  4.     <title></title>
  5.     <style>
  6.         /* min-width се дефинира от малко към голямо, max-width: от голямо към малко*/
  7.     body{
  8.         background:black;
  9.     }
  10.     div{
  11.        
  12.         margin:0 auto;
  13.         /*width:800px;*/
  14.     }
  15.     .container{
  16.         width:100px;
  17.         background:white;
  18.     }
  19.     @media screen and (min-width: 552px){
  20.         .container{
  21.             width: 300px;
  22.             background: lightseagreen;
  23.         }
  24.     }
  25.     @media screen and (min-width: 767px){
  26.         .container{
  27.             width: 500px;
  28.             background: magenta;
  29.         }
  30.     }
  31.     @media screen and (min-width: 992px){
  32.         .container{
  33.             width:800px;
  34.             background: darkblue;
  35.         }
  36.     }
  37.     /*@media screen and (max-width:800px){
  38.         .container{
  39.             width:500px;
  40.             background:orchid;
  41.         }
  42.     }
  43.     @media screen and (max-width:500px){
  44.         .container{
  45.             width:300px;
  46.             background: firebrick;
  47.         }
  48.     }*/
  49.     </style>
  50. </head>
  51. <body>
  52.     <div class="container">
  53.       <h1>This is a reponsive container</h1>
  54.       <p>This container is <span class=""></span> pixels wide when the browser is <span class=""></span> pixels wide. Resize the browser to see it change.</p>
  55.     </div>
  56. </body>
  57. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement