首页htmlresponsiveCSS Layout - 如何增加或减小窗口大小以查看背景颜色变化

CSS Layout - 如何增加或减小窗口大小以查看背景颜色变化

我们想知道如何增加或减小窗口大小以查看背景颜色变化。

<!DOCTYPE html>
<html>
<head>
<style type='text/css'>
p {
  font-size: 13px;
  font-color: black;
}
h1 {
  font-size: 30px;
}

@media screen and (min-width:761px) {
  body {
    background-color: white;
  }
  h1 {
    color: red;
  }
}

@media screen and (max-width:760px) {
  body {
    background-color: #333;
  }
  h1 {
    color: red;
  }
  p {
    color: white;
  }
}

@media screen and (max-width:480px) {
  body {
    background-color: #807f83;
  }
  h1 {
    color: white;
  }
  p {
    color: white;
  }
}

@media screen and (max-width:360px) {
  body {
    background-color: #0096d6;
  }
  h1 {
    color: white;
    font-size: 25px;
  }
  p {
    color: white;
  }
}
</style>
</head>
<body>
  <h1>Media Queries Examples</h1>
  <p>Increase or decrease the size of your window to see the
    background color change</p>
</body>
</html>