我创建了一个flex-box容器,其中有一个div内部包含更多的图片和段落。当我在css中使用“flex-wrap:wrap;”启用换行时,段落中的文本不再换行,导致方框断行并出现在下一个方框中。以下是相关的css代码和body。
.itembox {
display: flex;
flex-direction: row;
flex-flow: row wrap;
flex-grow: 1;
margin-top: 10px;
margin-bottom: 10px;
/*flex-shrink:0;*/
/*flex: 1 1 0;*/
/*justify-content: space-between;*/
/*flex-basis:100px;*/
/*flex-wrap:wrap;*/
}
<div class="itembox">
<div class="aritem">
<p>
<img src="img/digital media 200p.png" style="height:200px; width:200px;" />
</p>
<p class="bold caps">social media management</p>
<div class="aritemtext">
<p class="article">
<!--managing your presence on various social media platforms so your followers always get the latest updates.-->
manage your presence and content on social media
<br /><a href="#" class="readmore">→</a>
</p>
</div>
</div>
<div class="aritem">
<p>
<img src="img/prmanage.jpg" style="height:200px; width:200px;" />
</p>
<p class="bold caps">pr management</p>
<div class="aritemtext">
<p class="article">
<!--managing your communication strategies for a wonderful customer experience, thereby creating more value for your customers-->
manage communication strategy for your audience
<br /><a href="#" class="readmore">→</a>
</p>
</div>
</div>
<div class="aritem">
<p>
<img src="img/creative design 200p.png" style="height:200px; width:200px;" />
</p>
<p class="bold caps">Creative Design</p>
<div class="aritemtext">
<p class="article">
<!--need presentations, banners or a fresh new look of you site designed? Great! Send us a not and we take care of the rest-->
get presenations, banners, or a fresh new look for your website
<br /><a href="#" class="readmore">→</a>
</p>
</div>
</div>
<div class="aritem">
<p>
<img src="img/media 200p.png" style="height:200px; width:200px;" />
</p>
<p class="bold caps">media services</p>
<div class="aritemtext">
<p class="article">
video shoots, editing, and photography and production services
<!--available. contact today for a consultation-->
<br /><a href="#" class="readmore">→</a>
</p>
</div>
</div>
</div>
flex-wrap: nowrap
。也许您可以澄清一下问题是什么? - Matt