css url() not recognized in internet explorer 10

后端 未结 4 942
盖世英雄少女心
盖世英雄少女心 2021-01-05 07:32

I have this line in my CSS:

.ui-icon-zoom-in { content: url(images/16x16/ZoomIn.png); } 

Which I am using with jQuery UI Button widget li

4条回答
  •  感情败类
    2021-01-05 08:16

    The content property is only valid on :before and :after pseudo-elements. You should change it to:

    .ui-icon-zoom-in { 
      background: url(images/16x16/ZoomIn.png) no-repeat; 
      width:16px;
      height:16px;
    }
    

    Apart from that, IE8+ only supports content property if a valid DOCTYPE is specified.

提交回复
热议问题