IE10 Flexbox P element non-wrapping

前端 未结 5 1357
情歌与酒
情歌与酒 2020-12-29 02:14

http://jsfiddle.net/pvJRK/2/

Basically in IE10 a p element which has text wider than it\'s parent when the \"direction\" is a row, will overflow, and subsequently pu

5条回答
  •  北荒
    北荒 (楼主)
    2020-12-29 03:04

    Adding flex-shrink: 1 to the parent of the elements which need wrapping has fixed this for me in IE10.

    Note: flex: 1 1 auto (or -ms-flex) is a shorthand for:

    flex-grow: 1
    flex-shrink: 1
    flex-basis: auto
    

    In this case, it is specifically flex-shrink that will fix the issue. This property should be 1 by default, so I assume this is a bug with the IE10 implementation of flex box and by explicitly setting its value, it fixes the bug.

提交回复
热议问题