我想使用整洁的网格容器来创建两个三行,但第二行没有按预期启动,因为第一行不同的文本长度。第二行整洁的网格不能正常工作
的HTML:
<section id="featuredpost">
<div class="widget-wrap">
<h3>Vehicula Justo Elit Mollis</h3>
<article class="post">
<a href="#">
<img src="http://placehold.it/350x150">
</a>
<header>
<h4>
<a href="#">Fusce Commodo Ornare Venenatis Egestas</a>
</h4>
</header>
</article>
<article class="post">
<a href="#">
<img src="http://placehold.it/350x150">
</a>
<header>
<h4>
<a href="#">Fusce Commodo Ornare Venenatis Egestas</a>
</h4>
</header>
</article>
<article class="post">
<a href="#">
<img src="http://placehold.it/350x150">
</a>
<header>
<h4>
<a href="#">Fusce Commodo Ornare Venenatis Egestas</a>
</h4>
</header>
</article>
<article class="post">
<a href="#">
<img src="http://placehold.it/350x150">
</a>
<header>
<h4>
<a href="#">Fusce Commodo Ornare Venenatis Egestas</a>
</h4>
</header>
</article>
<article class="post">
<a href="#">
<img src="http://placehold.it/350x150">
</a>
<header>
<h4>
<a href="#">Fusce Commodo Ornare Venenatis Egestas</a>
</h4>
</header>
</article>
<article class="post">
<a href="#">
<img src="http://placehold.it/350x150">
</a>
<header>
<h4>
<a href="#">Fusce Commodo Ornare Venenatis Egestas</a>
</h4>
</header>
</article>
</div>
</section>
的SCSS:
.featuredpost {
@include grid-container;
.post {
@include grid-column(4);
}
}
下面是它是如何出现的截图:
Example of problem with second row
正如你所看到的,因为文字第一排的第一篇文章比第二排的第二篇文章长,在第二排造成问题。我可以通过在帖子元素上设置最小高度来解决此问题,但必须有更好的方法。我是否正确使用了Neat的网格?任何帮助表示赞赏!
完美。不知道为什么我没有想到这个解决方案。谢谢! – lovestacos