zoukankan      html  css  js  c++  java
  • css---媒体查询

    简单示例:

    <style type="text/css">
    /* 小于 300的时候 */
    @media screen and (max- 400px){
        body{background:red;}
    }
    /* 大于 300的时候 */
    @media screen and (min- 500px){
        body{background:orange;}
    }
    @media screen and (min-700px) and (max-900px){
      body {background:yellow;}
    }
    @media screen and (min- 800px){
        body{background:green;}
    }
    </style>

    标签示例:

    <link rel="stylesheet" media="(max- 800px)" href="example.css" />
    
    <link rel="stylesheet" media="only screen and (max-device-240px)" href="android240.css" />
    
    <link rel="stylesheet" media="(min-701px) and (max-900px)" href="mediu.css" /> 
  • 相关阅读:
    第九周
    第七周.
    第六周.
    第二次作业
    第九周作业
    第八周作业
    第七周作业
    第六周作业
    第五周作业
    统计一行文本的单词个数
  • 原文地址:https://www.cnblogs.com/e0yu/p/9088546.html
Copyright © 2011-2022 走看看