Text not wrapping in CSS Grid

后端 未结 1 972
故里飘歌
故里飘歌 2021-01-04 11:18

I\'ve been experimenting with CSS Grid and am stuck on finding the most effective means to have text wrap around a

element that is positioned partia
相关标签:
1条回答
  • 2021-01-04 11:51

    You can use exclusions, but these are only supported by Microsoft's Internet Explorer and Edge and should be used with caution (for now, we have to prefix properties with -ms- for exclusions to work, but that doesn't always end in success). In a nutshell, an exclusion is an area around an element that inline flow content wraps around.

    An element becomes an exclusion when its wrap-flow property has a computed value other than auto, so an example might be .p { wrap-flow: maximum }. The wrap-margin property sets the margin or offset surrounding the exclusion area.In your case, you could put .yellow { wrap-flow: both } in your CSS to allow the text in the other divs to wrap around the yellow div.

    Example of wrap-flow: both

    Links: Tutorial, browser support, specifications, tutorial

    Related Tags: html css css3 css-grid

    0 讨论(0)
提交回复
热议问题