html - Different height and position for col in bootstrap
问题描述
I wrote this code for insert image in order to create a grid full of photos:
<section class="gallery-section">
<div class="container grid-custom" style="padding-top: 50px;">
<div class="row">
<div style="padding: 0px;" class="text-center col-md-4 gallery-image">
<img src="./images/cover.jpg" alt="" class="img-fluid">
</div>
<div style="padding: 0px;" class="my-auto text-center col-md-4 gallery-image">
<img src="./images/passero.jpg" alt="" class="img-fluid">
</div>
<div style="padding: 0px;" class="text-center col-md-4 gallery-image">
<img src="./images/cigno.JPG" alt="" class="img-fluid">
</div>
</div>
<div class="row">
<div style="padding: 0px;" class="text-center col-md-4 gallery-image">
<img src="./images/pic1.jpg" alt="" class="img-fluid">
</div>
<div style="padding: 0px;" class="text-center col-md-4 gallery-image">
<img src="./images/fiore.JPG" alt="" class="img-fluid">
</div>
<div style="padding: 0px;" class="text-center col-md-4 gallery-image">
<img src="./images/sfondo7.jpg" alt="" class="img-fluid">
</div>
</div>
</div>
</section>
解决方案
What you are looking for is a Masonry Layout
.
There are a lot of websites that give nice tutorials. Here for instance I would refer to https://css-tricks.com/piecing-together-approaches-for-a-css-masonry-layout/
推荐阅读
- python - 在python中解码列表
- python - 使用 SQL-ALCHEMY 删除注册时出错
- c++ - 非 ASCII 文件路径 Windows
- android - MaterialDrawerTheme.ActionBar - android.support.v7.preference.SwitchPreferenceCompat 的显示状态不正确
- oracle - Oracle sql大写土耳其语字符
- elasticsearch - Elasticsearch 分桶和添加到列表
- php - Ajax 脚本编写
- serial-port - Modbus RTU 在传输时是否需要字符之间的间隙?
- nginx - Nginx 服务器无法为请求找到匹配的位置
- storybook - config.js 与 preview.js 的故事书?