IE8 CSS Hack - best method?

前端 未结 7 1680
孤城傲影
孤城傲影 2020-12-06 11:55

Can anyone recommend the best way to hack IE8 styling via CSS, I\'ve recently been making IE8 render as IE7 for ease - but wondered if it was best to add IE8 hacks?

7条回答
  •  长情又很酷
    2020-12-06 12:35

    As other answers posted,you could use Conditional Comments,but that would add one HTTP request when user is using IE8. You can use the \0 hack in the css file

    img{
    width:200px;//other broswers
    width:100px\0;//only IE8
    }
    

提交回复
热议问题