开发者

Does pngfix only affect images in the markup vs in the css?

I have a sprite that I'm using for rounded corners. The left corner sits on top of a gradient background, but the right corner sits on a white background. I don't want to have to put the images on the page as I'd rather have them in a sprite and just move the placement through the background property.

Will something like pngfix not work if the png is not 开发者_高级运维in the markup?

Edited to incorporate OP's clarifications (posted in an answer, below) into the question:

Sorry, meaning will something like pngfix apply to png's that are in a CSS file or only when it's in the markup:

<img src="myimage.png" class="png" />

etc...


Yes, the pngfix.htc script will apply to both markup and css background images.

However, the more recent DD Belated PNG fix is the better option as it addresses more things than the older pngfix (namely, positioned and repeating backgrounds):

http://www.dillerdesign.com/experiment/DD_belatedPNG/


Yes, by adding the following line all your to your CSS background-PNG rules:

behavior: url(/pathto/iepngfix.htc);


Sorry, meaning will something like pngfix apply to png's that are in a CSS file or only when it's in the markup:

<img src="myimage.png" class="png" />

etc...


NOT GOING TO WORK

The png hack will not work on any image that has a position property in css. So basically your out of luck with sprites, unless you use a gif.

You can get pngfix to work on images in CSS and HTML. However, they can't be positioned.

If you want to fix pngs on IE6 you should read this article too.

http://24ways.org/2007/supersleight-transparent-png-in-ie6

MIGHT GO OK

Check out Andrew Vit's Suggestion.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜