Stretch a background image in IE8

前端 未结 7 807
时光说笑
时光说笑 2020-12-14 13:29

I\'m trying to stretch a background image to 100% width and height of the parent div. background-size is not supported in IE8 of-course. I tried the following code but it\'s

7条回答
  •  庸人自扰
    2020-12-14 13:49

    HTML:

    
    

    CSS:

    img.fullscreen {
      border:     0;
      height:     auto;
      left:       0;
      min-height: 100%;
      min-width:  1024px;
      padding:    0;
      position:   fixed;
      top:        0;
      width:      100%;
      z-index:    -1001;
    }
    

提交回复
热议问题