12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>Document</title>
- <link rel="stylesheet" media="screen and (min-width:500px)" href="./css/a.css">
- <style>
- .box{
- width: 200px;
- height: 200px;
- background-color: red;
- }
- /* @media screen and (min-width:500px){
- .box{
- width: 400px;
- height: 400px;
- }
- } */
- /* @media screen and (max-width:500px) {
- .box{
- background-color: blue;
- }
- } */
- /* @media screen and (min-width:500px) and (max-width:800px){
- .box{
- background-color: blue;
- }
- } */
- /* 监听屏幕为横屏时 */
- /* @media screen and (orientation: landscape){
- .box{
- background-color: blue;
- }
- } */
- /* 监听屏幕为竖屏 */
- /* @media screen and (orientation: portrait){
- .box{
- background-color: blue;
- }
- } */
- </style>
- </head>
- <body>
- <div class="box"></div>
- </body>
- </html>
|