CSS sprites and IE6

后端 未结 9 2368
情歌与酒
情歌与酒 2021-02-10 07:19

Does IE6 support css-sprites?

相关标签:
9条回答
  • 2021-02-10 07:47

    I have encountered the IE6 CSS sprites problem myself - I blogged it here:

    There's a really easy fix - I quote myself here...

    Luckily, the solution wasn't too bad. Internet Explorers passim seem to ignore overflow:hidden when a child element is set to position:relative. Not good news... but the solution is easy - set the element with overflow:hidden to also be position:relative and then change the position:relative declaration on the child to be position:absolute... the jobs a goodun.

    The full details can be found on that link.

    0 讨论(0)
  • 2021-02-10 07:51

    Yes IE 6 supports sprites but doesn't support 24 bit PNG transparency.

    I use this css hack for giving IE < 7 a gif file and everything else a 24 bit png with transparency.

    background-image:url(/images/sprites/icons-sprite.png);
    _background-image:url(/images/sprites/icons-sprite.gif); /* IE<7 gets the crappy icons */
    
    0 讨论(0)
  • 2021-02-10 07:54

    CSS sprites is a general solution using backround-position, which is avaible even in IE5.

    A good tutorial about them is located here: http://www.smashingmagazine.com/2009/04/27/the-mystery-of-css-sprites-techniques-tools-and-tutorials/

    0 讨论(0)
提交回复
热议问题