Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/33.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 添加图像并在填充最大宽度后开始水平滚动_Html_Css_Twitter Bootstrap - Fatal编程技术网

Html 添加图像并在填充最大宽度后开始水平滚动

Html 添加图像并在填充最大宽度后开始水平滚动,html,css,twitter-bootstrap,Html,Css,Twitter Bootstrap,我正在构建一个由方形瓷砖组成的马赛克(imgtags)。我正在一行一行地构建它(ng repeatwith Angular)。 我想设置马赛克区域的max height和max width,溢出时需要滚动 在垂直方向上,它正在工作。在横向上不是;事实上,当图像室结束时,下一个图像将转到一个新行 我进入了一个引导栏 以下是我的代码HTML代码: <div class="mosaic-container"> <span ng-repeat="line in mosaic.lin

我正在构建一个由方形瓷砖组成的马赛克(
img
tags)。我正在一行一行地构建它(
ng repeat
with Angular)。 我想设置马赛克区域的
max height
max width
,溢出时需要滚动

在垂直方向上,它正在工作。在横向上不是;事实上,当图像室结束时,下一个图像将转到一个新行

我进入了一个引导栏

以下是我的代码HTML代码:

<div class="mosaic-container">
  <span ng-repeat="line in mosaic.lines" class="mosaic-line">
    <span ng-repeat="element in line" class="mosaic-square">
      <img ng-src="mosaic_{{coordinates}}.jpeg" class="mosaic-image">
    </span>
    <br>
  </span>
</div>
.mosaic-container {
  overflow-y: auto;
  max-height: 520px;
  max-width: 730px;
  overflow-x: auto;
}

.mosaic-line {
  display: inline-block;
  width: 100%;
}

.mosaic-square {
  display: inline-block;
  position: relative;
}

.mosaic-image {
  max-width: 42px;
  z-index: 0;
}