• 图片响应式排列


    图片的响应式排列(此处用四分图做例)

    四分图的大体可分为:

    类别一:

    类别二:

    最终响应式效果为:

    ----------------------------------------

    此处用bootstrap框架

    ----------------------------------------

    直接引用:

    1 <link rel="stylesheet" href="https://cdn.static.runoob.com/libs/bootstrap/3.3.7/css/bootstrap.min.css">
    2     <script src="https://cdn.static.runoob.com/libs/jquery/2.1.1/jquery.min.js"></script>
    3     <script src="https://cdn.static.runoob.com/libs/bootstrap/3.3.7/js/bootstrap.min.js"></script>

    ------------

    类别一

    HTML代码部分为:

    <div class="container" style=" 400px;">
        <div class="row">
            <div class="col-md-6" style="border: 1px solid red;">图一</div>
            <div class="col-md-6" style="border: 1px solid red;">图二</div>
        </div>
        <div class="row">
            <div class="col-md-6" style="border: 1px solid red;">图三</div>
            <div class="col-md-6" style="border: 1px solid red;">图四</div>
        </div>
    </div>

    效果图:

    ------------

    类别二

    HTML代码部分:

     1 <div class="container" style=" 400px;">
     2     <div class="row">
     3         <div class="col-md-6" style="border: 1px solid blue;">图一</div>
     4         <div class="col-md-6" style="border: 1px solid blue;">图二</div>
     5     </div>
     6     <div class="row">
     7         <div class="col-md-6 col-md-push-6" style="border: 1px solid blue;">图三</div>
     8         <div class="col-md-6 col-md-pull-6" style="border: 1px solid blue;">图四</div>
     9     </div>
    10 </div>

    效果图:

    -----------------------------------------------

    全部代码:

     1 <!DOCTYPE html>
     2 <html lang="zh-cn">
     3 <head>
     4     <meta charset="utf-8">
     5     <title>test</title>
     6 
     7     <link rel="stylesheet" href="https://cdn.static.runoob.com/libs/bootstrap/3.3.7/css/bootstrap.min.css">
     8     <script src="https://cdn.static.runoob.com/libs/jquery/2.1.1/jquery.min.js"></script>
     9     <script src="https://cdn.static.runoob.com/libs/bootstrap/3.3.7/js/bootstrap.min.js"></script>
    10 </head>
    11 <body>
    12 
    13 <div class="container" style=" 400px;">
    14     <div class="row">
    15         <div class="col-md-6" style="border: 1px solid red;">图一</div>
    16         <div class="col-md-6" style="border: 1px solid red;">图二</div>
    17     </div>
    18     <div class="row">
    19         <div class="col-md-6" style="border: 1px solid red;">图三</div>
    20         <div class="col-md-6" style="border: 1px solid red;">图四</div>
    21     </div>
    22 </div>
    23 
    24 <div class="container" style=" 400px;">
    25     <div class="row">
    26         <div class="col-md-6" style="border: 1px solid blue;">图一</div>
    27         <div class="col-md-6" style="border: 1px solid blue;">图二</div>
    28     </div>
    29     <div class="row">
    30         <div class="col-md-6 col-md-push-6" style="border: 1px solid blue;">图三</div>
    31         <div class="col-md-6 col-md-pull-6" style="border: 1px solid blue;">图四</div>
    32     </div>
    33 </div>
    34 
    35 </body>
    36 </html>
  • 相关阅读:
    std::async
    k最近邻算法(kNN)
    QNX下进程间通信
    ubuntu 18.04 安装破解pycharm professional 专业版
    安装scrapy出现Twisted依赖问题
    pytorchhub解决bug:.cache orchhubmaster.zip.....'另一个程序正在使用此文件,进程无法访问。'
    pytorchhub教程之安装pytorch或pytorchversion
    错误:java.lang.ClassNotFoundException:org.apache.commons.fileupload.FileItemFactory 解决方案
    Failed to start component [StandardEngine[Catalina].StandardHost[localhost].错误解决方案
    Javaweb之注解访问servlet和web.xml配置文件
  • 原文地址:https://www.cnblogs.com/gwcyulong/p/6255224.html
Copyright © 2020-2023  润新知