【发布时间】:2018-03-20 00:03:28
【问题描述】:
我发现很难实现这个精确的照片网格关于如何去做的任何想法? enter image description here
为了澄清,我已经有了工作原型enter image description here,它是用 flexbox 完成的,但是一个不适合,所以我不得不使用绝对位置,这在其他屏幕尺寸上显示时效果不佳。
这是我的代码
.container-ed {
padding: 0px 40px;
display: flex;
justify-content: space-between;
flex-wrap: wrap;
margin-top: 30px;
}
.pic-ed {
position: relative;
}
.pic-ar {
position: absolute;
right: 40px;
margin-top: 280px;
}
.pic-ad {
margin-top: 10px;
}
<div class="container-ed">
<img class="pic-ed" src="img/pic.svg" height="550" width="600">
<!-- <img class="x-ed" src="img/ex-ed.svg"> -->
<img class="pic-ad" src="img/Rectangle%20136.svg" height="250" width="300">
<img class="pic-ad" src="img/Rectangle%20136.svg" height="250" width="300">
<img class="pic-ad" src="img/Rectangle%20136.svg" height="250" width="300">
<img class="pic-ad" src="img/Rectangle%20136.svg" height="250" width="300">
<img class="pic-ar" src="img/Rectangle%20136.svg" height="250" width="300">
</div>
【问题讨论】:
-
SO 不是代码编写服务。表现出你自己的努力,如果你不能让它发挥作用,就回来。这是一个很好的阅读stackoverflow.com/help/mcve
-
@LGSon 你现在看到我以前的努力了
标签: html image css grid flexbox