Flexbox not working in Safari

后端 未结 1 578
半阙折子戏
半阙折子戏 2021-02-14 03:30

The layout I am creating isn\'t working in Safari though it works perfectly in Chrome. I have a feeling it has something to do with the .wrapper or the .frame

相关标签:
1条回答
  • 2021-02-14 04:17

    The issue is on your .content class. Specifically, in this section of code.

    .content {
        display: block;
      flex: 1 1 auto;
      background: #ffffd;
      height: auto;
      overflow-y: auto;
      overflow-x: hidden;
      padding-right:.5em;
      padding-bottom:.5em;
    }
    

    Safari still requires the -webkit- prefix to use flexbox. So you will need to add the -webkit- prefix to you flex property.

    Example (JSFiddle):

    .content {
        display: block;
      -webkit-flex: 1 1 auto;
      -ms-flex: 1 1 auto;
      flex: 1 1 auto;
      background: #ffffd;
      height: auto;
      overflow-y: auto;
      overflow-x: hidden;
      padding-right:.5em;
      padding-bottom:.5em;
    }
    
    0 讨论(0)
提交回复
热议问题