zoukankan      html  css  js  c++  java
  • 媒体查询的两种方式

    第一种:link的方式:

    1 <link rel="stylesheet" media="screen and (max-600px)" href="./css/blue.css">
    2     <link rel="stylesheet" media="screen and (min-900px)" href="./css/red.css">
    3     <link rel="stylesheet" media="screen and (min-1200px)" href="./css/yellow.css">

    第二种:css的方式:

        <style>
            @media screen and (max-600px) {
                body {
                    background-color: blue;
                }
            }
    
            @media screen and (min-900px) {
                body {
                    background-color: red;
                }
            }
    
            @media screen and (min-1200px) {
                body {
                    background-color: yellow;
                }
            }
        </style>
  • 相关阅读:
    算法53----换钱的最小次数和方法数【动态规划】
    算法52-----矩阵最小路径【动态规划】
    Data
    Git
    Git
    Git
    Git
    DevOps
    Docker
    Tools
  • 原文地址:https://www.cnblogs.com/yangguoe/p/8260945.html
Copyright © 2011-2022 走看看