Height of flex item is wrong in Safari

前端 未结 1 1219
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-19 08:00

In Safari, the element (div.header) with this layout doesn\'t calculate its height. In Chrome it works.

If you open this example in Safari, you will see

相关标签:
1条回答
  • 2021-01-19 08:25

    There's an issue with Safari where you need to define flex-shrink.

    Add this to your code:

    .header { flex-shrink: 0 }
    
    0 讨论(0)
提交回复
热议问题