0
在同一容器中應用不同的流動我想的h1
元件具有在容器的頂端,在中央,用column
方向。我如何對齊它?與Flexbox的
HTML:
<div class="container">
<h1>Description</h1>
<figure class="gallery-item">
<span class="helper"></span><img src="http://placehold.it/300x300">
<figcaption class="img-title">
<h5>Image Title</h5>
</figcaption>
</figure>
<figure class="gallery-item">
<span class="helper"></span><img src="http://placehold.it/300x300">
<figcaption class="img-title">
<h5>Image Title</h5>
</figcaption>
</figure>
<figure class="gallery-item">
<span class="helper"></span><img src="http://placehold.it/300x300">
<figcaption class="img-title">
<h5>Image Title</h5>
</figcaption>
</figure>
</div>
CSS:
.container {
display: flex;
flex-direction: row;
align-items: center;
height: 75vh;
background: grey;
justify-content: space-around;
}
謝謝!