Html 如何制作4张图片组合照片

Html 如何制作4张图片组合照片,html,css,image,twitter-bootstrap,responsive-design,Html,Css,Image,Twitter Bootstrap,Responsive Design,我有一个问题,我希望我的图片像这样对齐: <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0, user scalable=no"> <link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootst

我有一个问题,我希望我的图片像这样对齐:

      <meta charset="UTF-8">
      <meta name="viewport" content="width=device-width, initial-scale=1.0, user scalable=no">
      <link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">

      <style>
          #img-one {
            float: right;
          }

          #img-three {
            float: right;
          }
      </style>
    </head>

    <body>
      <div id="Image-Section">
          <div id="img-one">
          <img src="one.jpg" alt="Image" class="img-responsive" width="631" height="390">
        </div>

        <div id="img-two">
          <img src="two.jpg" alt="Image" class="img-responsive" width="631" height="390">
        </div>

        <div id="img-three">
          <img src="three.jpg" alt="Image" class="img-responsive" width="631" height="390">
        </div>

        <div id="img-four">
          <img src="four.jpg" alt="Image" class="img-responsive" width="631" height="390">
        </div>
      </div>

      <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
    </body>
    </html>
而且它应该是响应性的,但我无法获得所需的帮助

      <meta charset="UTF-8">
      <meta name="viewport" content="width=device-width, initial-scale=1.0, user scalable=no">
      <link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">

      <style>
          #img-one {
            float: right;
          }

          #img-three {
            float: right;
          }
      </style>
    </head>

    <body>
      <div id="Image-Section">
          <div id="img-one">
          <img src="one.jpg" alt="Image" class="img-responsive" width="631" height="390">
        </div>

        <div id="img-two">
          <img src="two.jpg" alt="Image" class="img-responsive" width="631" height="390">
        </div>

        <div id="img-three">
          <img src="three.jpg" alt="Image" class="img-responsive" width="631" height="390">
        </div>

        <div id="img-four">
          <img src="four.jpg" alt="Image" class="img-responsive" width="631" height="390">
        </div>
      </div>

      <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
    </body>
    </html>
这是我的源代码:

      <meta charset="UTF-8">
      <meta name="viewport" content="width=device-width, initial-scale=1.0, user scalable=no">
      <link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">

      <style>
          #img-one {
            float: right;
          }

          #img-three {
            float: right;
          }
      </style>
    </head>

    <body>
      <div id="Image-Section">
          <div id="img-one">
          <img src="one.jpg" alt="Image" class="img-responsive" width="631" height="390">
        </div>

        <div id="img-two">
          <img src="two.jpg" alt="Image" class="img-responsive" width="631" height="390">
        </div>

        <div id="img-three">
          <img src="three.jpg" alt="Image" class="img-responsive" width="631" height="390">
        </div>

        <div id="img-four">
          <img src="four.jpg" alt="Image" class="img-responsive" width="631" height="390">
        </div>
      </div>

      <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
    </body>
    </html>

#img一号{
浮动:对;
}
#img三{
浮动:对;
}

我已经使用bootstrap和css对齐了我的图片,它也很灵敏,但是它很混乱

你可以试试这个,而不是像我那样在css中更改
填充
,你应该在bootstrap自定义中更改它

      <meta charset="UTF-8">
      <meta name="viewport" content="width=device-width, initial-scale=1.0, user scalable=no">
      <link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">

      <style>
          #img-one {
            float: right;
          }

          #img-three {
            float: right;
          }
      </style>
    </head>

    <body>
      <div id="Image-Section">
          <div id="img-one">
          <img src="one.jpg" alt="Image" class="img-responsive" width="631" height="390">
        </div>

        <div id="img-two">
          <img src="two.jpg" alt="Image" class="img-responsive" width="631" height="390">
        </div>

        <div id="img-three">
          <img src="three.jpg" alt="Image" class="img-responsive" width="631" height="390">
        </div>

        <div id="img-four">
          <img src="four.jpg" alt="Image" class="img-responsive" width="631" height="390">
        </div>
      </div>

      <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
    </body>
    </html>
演示:

      <meta charset="UTF-8">
      <meta name="viewport" content="width=device-width, initial-scale=1.0, user scalable=no">
      <link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">

      <style>
          #img-one {
            float: right;
          }

          #img-three {
            float: right;
          }
      </style>
    </head>

    <body>
      <div id="Image-Section">
          <div id="img-one">
          <img src="one.jpg" alt="Image" class="img-responsive" width="631" height="390">
        </div>

        <div id="img-two">
          <img src="two.jpg" alt="Image" class="img-responsive" width="631" height="390">
        </div>

        <div id="img-three">
          <img src="three.jpg" alt="Image" class="img-responsive" width="631" height="390">
        </div>

        <div id="img-four">
          <img src="four.jpg" alt="Image" class="img-responsive" width="631" height="390">
        </div>
      </div>

      <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
    </body>
    </html>
编辑:按钮

      <meta charset="UTF-8">
      <meta name="viewport" content="width=device-width, initial-scale=1.0, user scalable=no">
      <link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">

      <style>
          #img-one {
            float: right;
          }

          #img-three {
            float: right;
          }
      </style>
    </head>

    <body>
      <div id="Image-Section">
          <div id="img-one">
          <img src="one.jpg" alt="Image" class="img-responsive" width="631" height="390">
        </div>

        <div id="img-two">
          <img src="two.jpg" alt="Image" class="img-responsive" width="631" height="390">
        </div>

        <div id="img-three">
          <img src="three.jpg" alt="Image" class="img-responsive" width="631" height="390">
        </div>

        <div id="img-four">
          <img src="four.jpg" alt="Image" class="img-responsive" width="631" height="390">
        </div>
      </div>

      <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
    </body>
    </html>
HTML

      <meta charset="UTF-8">
      <meta name="viewport" content="width=device-width, initial-scale=1.0, user scalable=no">
      <link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">

      <style>
          #img-one {
            float: right;
          }

          #img-three {
            float: right;
          }
      </style>
    </head>

    <body>
      <div id="Image-Section">
          <div id="img-one">
          <img src="one.jpg" alt="Image" class="img-responsive" width="631" height="390">
        </div>

        <div id="img-two">
          <img src="two.jpg" alt="Image" class="img-responsive" width="631" height="390">
        </div>

        <div id="img-three">
          <img src="three.jpg" alt="Image" class="img-responsive" width="631" height="390">
        </div>

        <div id="img-four">
          <img src="four.jpg" alt="Image" class="img-responsive" width="631" height="390">
        </div>
      </div>

      <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
    </body>
    </html>
<div class="container text-center">
    <div class="row">
        <div class="col-sm-6">
           <img src="http://placehold.it/700x400" alt="" class="img-responsive"> 
        </div>
        <div class="col-sm-6">
            <img src="http://placehold.it/700x400" alt="" class="img-responsive">
        </div>
    </div>
    <div class="row">
        <div class="col-sm-6">
           <img src="http://placehold.it/700x400" alt="" class="img-responsive"> 
        </div>
        <div class="col-sm-6">
            <img src="http://placehold.it/700x400" alt="" class="img-responsive">
        </div>
    </div>
</div>

#img一号{
浮动:对;
}
#img三{
浮动:对;
}
.img xxx{
宽度:631px!重要;
高度:390px!重要;
}

欢迎来到SO!请创建一个提琴,以便我们可以看到演示您可以复制并尝试此代码它的完整代码它不完整,您没有图像的完整路径。非常感谢,但它是中心的。您不想居中吗?是的,但它在小屏幕中混乱