【发布时间】:2016-04-30 19:27:01
【问题描述】:
我对属性“align-content: space-between”有一些问题。 使用“justify-content”,我在弹性项目中添加了“space-between”,现在我想在不同的包装行之间添加空间。
CSS
article > div {
align-content: space-between;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
}
#preview {
background-color: black;
width: 49.5%;
text-align: center;
}
HTML
<article>
<div>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div id="preview">
<?php if (has_post_thumbnail()) { ?>
<a href="<?php the_permalink() ?>"><?php the_post_thumbnail(); ?></a>
<?php } ?>
<h2><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h2>
</div>
<?php endwhile; ?>
</div>
<?php endif; ?>
</article>
【问题讨论】:
-
PHP 在这里没用...我们需要实际问题的 HTML/CSS 演示,很难说问题是什么
-
请澄清您的具体问题或添加其他详细信息以准确突出您的需要。正如目前所写的那样,很难准确地说出你在问什么。