On Fri, 17 Dec 2010 00:30:01 +0100, Holger Jeromin <[email protected]> wrote:
> Robert Longson schrieb am 16.12.2010 18:20: > >>> I've found my code behaves differently in major browsers. The SVG >>> variant of the cursor is ignored at all. Only Chrome prefers the >>> raster PNG variant, but the rest uses the last available fallback - >>> the defined standard cursor. Beside this there are other issues: >> See http://longsonr.wordpress.com/2010/12/16/svg-cursors/ for how to >> do SVG cursors in Firefox 4. In short, you need to use CSS directly >> and avoid the SVG cursor element. > > Thanks for this info. > > I just discovered, that you can use a data uri with a png, too. :-) > > var dropcursorStyle = > "url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOBAMAAADtZjDiAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAADBQTFRF////M2bMP2/PS3jSVoHUYorXbpPaepvdhqTgka3inLblqL/owNDuzNnx1+Lz4+v2CpBZCQAAAAF0Uk5TAEDm2GYAAABRSURBVAhbY2AAgZXzwdQTkQsgilexAMy9JAYk+Bn4De2B9FEGNsEDQLpxwkaQMIOhlKEciBYUFAwA0RsFBTeAaG5BIbBmBogyoIAUhGbYCyIAUTsNEExoQVIAAAAASUVORK5CYII=) > 5 12, crosshair"; > > node.style.cursor = dropcursorStyle; > > works in Firefox (should be version 1.5) and Safari > No opera, no ie9 though, they even ignore the crosshair... 8-/ Thanks, I reported that as an Opera bug (CORE-35318). There's a slight difference in CSS2.1 vs CSS3 in the 'cursor' syntax, you can specify a coordinate in CSS3 but not in CSS2.1. If the coordinate (5 12) is removed the fallback cursor (crosshair) is shown correctly in Opera. You can see in the error console that the stylerule is discarded because it's deemed invalid by the css parser. Cheers /Erik -- Erik Dahlstrom, Core Technology Developer, Opera Software Co-Chair, W3C SVG Working Group Personal blog: http://my.opera.com/macdev_ed ------------------------------------ ----- To unsubscribe send a message to: [email protected] -or- visit http://groups.yahoo.com/group/svg-developers and click "edit my membership" ----Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/svg-developers/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/svg-developers/join (Yahoo! ID required) <*> To change settings via email: [email protected] [email protected] <*> To unsubscribe from this group, send an email to: [email protected] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/

