محتوى الدورة
Learn CSS In Arabic 2021
وصف الدرس

ال Code الموجود في الدرس

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <title>CSS</title>
    <link rel="stylesheet" href="css/master.css" />
  </head>
  <body>
    <div class="parent">
      <div>1</div>
      <div>2</div>
      <div>3</div>
      <div>4</div>
    </div>
  </body>
</html>
/*
  Media Queries
  Responsive Design
*/

* {
  box-sizing: border-box;
  margin: 0;
}
.parent {
  display: flex;
  width: 1200px;
  justify-content: space-between;
  flex-wrap: wrap;
  margin: 20px auto;
}
.parent > div {
  background-color: red;
  color: white;
  text-align: center;
  font-size: 20px;
  width: 290px;
}

@media print {
  .parent > div {
    font-size: 100px;
  }
}

@media print {
  .parent > div:first-child {
    display: none;
  }
}

@media (min-width: 1400px) {
  .parent > div {
    background-color: blue;
  }
}

@media (min-width: 1000px) and (max-width: 1400px) {
  .parent > div {
    background-color: blue;
  }
}