Using SVG as background image

后端 未结 5 839
忘掉有多难
忘掉有多难 2020-12-12 20:55

I can\'t seem to get this to work as desired. My page changes height based on what content is loaded and if it requires a scroll, the svg doesn\'t seem to be stretching...

5条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-12 21:13

    Set Background svg with content/cart at center

    .login-container {
      justify-content: center;
      align-items: center;
      display: flex;
      height: 100vh; 
      background-image: url(/assets/images/login-bg.svg);
      background-position: center;
      background-repeat: no-repeat;
      background-size: cover;
    }
    

提交回复
热议问题