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

    1.背景随着边框的大小改变

    <!DOCTYPE html>
    <html>
    <head>
    <meta charset="UTF-8">
    <title>Insert title here</title>
    <style type="text/css">
    @media only screen and (min- 0px) and (max- 768px) {
        body {
            background-color: red;
        }
    }
    
    @media only screen and (min- 768px) and (max- 992px) {
        body {
            background-color: green;
        }
    }
    
    @media only screen and (min- 992px) {
        body {
            background-color: blue;
        }
    }
    </style>
    </head>
    <body>
    
    </body>
    </html>

    2.bootStrap

    超小屏幕

    手机 0-768px

    小屏幕

    平板768-992

    中等屏幕

    电脑992-1200

    大屏幕

    电脑1200-?

    Col-xs-

    Col-sm-

    Col-md

    Col-lg

    2.1bootStrap使用

    <!DOCTYPE html>
    <html>
        <head>
            <meta charset="UTF-8">
            <title></title>
            <link rel="stylesheet" type="text/css" href="css/bootstrap.css"/>
        </head>
        <body>
            <div class="container">
                <div class="row">
                    <div class="col-xs-12 col-sm-6 col-md-4" style="background-color: red;">1111</div>
                    <div  class="col-xs-12 col-sm-6 col-md-4" style="background-color: green;">222</div>
                    <div  class="col-xs-12 col-sm-6 col-md-4" style="background-color: blue;">333</div>
                </div>
            </div>
        </body>
    </html>
  • 相关阅读:
    每天进步一小点
    C# 类
    XML JavaScript
    基础XML
    多态,重载,重写
    数据结构
    sql server规范
    .net core 使用TimeZoneInfo类的时间与时间戳转换
    git 重命名文件与文件夹
    IDEA spring boot 开启热加载
  • 原文地址:https://www.cnblogs.com/gxlaqj/p/11668442.html
Copyright © 2011-2022 走看看