deyanivanov966

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

Dec 12th, 2021 (edited)
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4.     <meta charset="UTF-8">
  5.     <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6.     <title>Document</title>
  7.     <style>
  8.         .row {
  9.             font-size:0px;
  10.         }
  11.         .row > div {
  12.             box-sizing: border-box;
  13.             font-size:16px;
  14.             padding:10px;
  15.             margin-bottom:8px;
  16.         }
  17.         .first, .second{
  18.             background:orange;
  19.         }
  20.  
  21.         .third{
  22.             background:#daec00;
  23.         }
  24.  
  25.         .fourth, .fifth, .sixth {
  26.             background: blue;
  27.         }
  28.  
  29.         .seventh, .eighth, .ningth, .tenth{
  30.             background: #c7c7c7;
  31.  
  32.         }
  33.         body{
  34.             margin:0px;
  35.         }
  36.         @media screen and (min-width: 768px){
  37.             .seventh, .eighth, .ningth, .tenth{
  38.                 display:inline-block;
  39.                 width:49.5%;
  40.                 margin-bottom:8px;
  41.             }
  42.             .seventh, .ningth{
  43.                 margin-right:0.5%;
  44.             }
  45.             .eighth, .tenth{
  46.                 margin-left:0.5%;
  47.             }
  48.         }
  49.         @media screen and (min-width: 1024px){
  50.             .row:nth-of-type(1){
  51.                 display:flex;
  52.                 flex-direction: row;
  53.             }
  54.             .first, .second{
  55.                 flex: 0 1 calc(50% - 6px);
  56.  
  57.             }
  58.             .first{
  59.                 margin-right:6px;
  60.             }
  61.             .second{
  62.                 margin-left:6px;
  63.             }
  64.  
  65.             .row:nth-of-type(3){
  66.                 display:flex;
  67.                 flex-direction: row;
  68.             }
  69.  
  70.             .fourth, .fifth, .sixth{
  71.                 flex: 0 1 calc(33.3% - 4px);
  72.             }
  73.             .fourth{
  74.                 margin-right:6px;
  75.             }
  76.  
  77.             .fifth{
  78.                 margin-left:6px;
  79.                 margin-right:6px;
  80.             }
  81.             .sixth{
  82.                 margin-left:6px;
  83.             }
  84.            
  85.         }
  86.     </style>
  87. </head>
  88. <body>
  89.     <div class="row">
  90.         <div class="first">1</div>
  91.         <div class="second">2</div>
  92.     </div>
  93.     <div class="row">  
  94.         <div class="third">3</div>
  95.     </div>
  96.     <div class="row">
  97.         <div class="fourth">4</div>
  98.         <div class="fifth">5</div>
  99.         <div class="sixth">6</div>
  100.     </div>
  101.     <div class="row">
  102.         <div class="seventh">7</div>
  103.         <div class="eighth">8</div>
  104.         <div class="ningth">9</div>
  105.         <div class="tenth">10</div>
  106.     </div>
  107. </body>
  108. </html>                                                
Add Comment
Please, Sign In to add comment