- From: Sylvain Galineau <sylvaing@microsoft.com>
- Date: Sat, 9 Jul 2011 19:47:11 +0000
- To: Andrew Fedoniouk <news@terrainformatica.com>, "www-style@w3.org" <www-style@w3.org>
[Andrew Fedoniouk:] > It would be convenient if CSS will have 'background-image-frame: "string" > ' > property. PNG and other image formats support annotated/taged/named sub- > images so in principle they can be used as image-lists - single-file > collections of multiple images / frames. > > CSS "sprites" as a workaround are quite popular among Web designers but > current solution [1] looks more like a hack rather than a solution. > > This: > > #panel1b a { background: url(test-3.jpg) "normal" no-repeat; } > #panel1b a:hover { background-image-frame: "hover"; } > #panel1b a:active { background-image-frame: "active"; } > > [1] http://www.alistapart.com/articles/sprites > You can do this in IE9 using SVG; define a <viewBox> for each image, given them an ID and reference them using a fragment e.g. background-image: url('./images.svg#third-frame');
Received on Saturday, 9 July 2011 19:47:39 UTC