所以我愚蠢地设计了一个最近的文章列表,世界上一切都很好,但前 2 个条目 html 与其余条目明显不同。
我还没有打开一行代码,因此非常感谢任何人提供的任何建议。
简单地说, ul 看起来像:
<li class="1of2"> /* It's number 1 – give it a class to identify it as special */
<h1>{title}</h1>
<p>{short_desc}</p>
</li>
<li class="1of2"> /* It's number 2 – give it a class to identify it as special */
<h1>{title}</h1>
<p>{short_desc}</p>
</li>
<li> /* It's not number 1 or 2 – ie. every other item, NO class per se */
<h1>{title}</h1>
<p>{short_desc}</p>
</li>
如果您想象所有条目的 3 列网格,但前 2 个条目各有 1.5 列。这里有点面条划痕,任何想法都感激地投票。
PS。如果有帮助,我将使用 Stash!