I want the background picture not to be displayed in the IE. How do I do that?

后端 未结 8 1457
暗喜
暗喜 2020-12-22 05:04

Here\'s the CSS , and I want the background picture not to be displayed in IE . Instead I just want the background color to be displayed. How do I do that?

h         


        
8条回答
  •  隐瞒了意图╮
    2020-12-22 05:36

    replace the tag html of your HTML for this:

    
    
    
    
      
    

    then in the css:

        html,body{      
          margin:0;
          padding: 0;
    
          background-image: url("background.png");
    
          background-repeat: no-repeat;
          background-size: cover; 
    
          margin:0;
          padding: 0;     
        }
    
    html.lt-ie9,html.lt-ie9 body{
          background: #a9ac41;
          background-image: none;
    }
    

    Note: IE10 doesn't support conditional comments son this method works in < IE9.

提交回复
热议问题