I have a number of heroshot images, that have a modal popup when clicked.
I'm trying to get my cursor to turn into magnifying glass whenever it is moved over the image. The following CSS does not appear to work even though my magnify.cur
is present in the right location.
a.heroshot img {
cursor:url(/img/magnify.cur), pointer;
}
Has anyone ever done anything similar? I don't mind a JavaScript solution if one exists.
EDIT: It works in Safari, but not in Firefox.
Your problem may be that cursor URLs don't work in Firefox for the Mac.
You can get the same effect on Firefox by using the
-moz-zoom-in
keyword.This will show magnify.cur, the Mozilla-specific zoom cursor or a system default cursor. The first cursor on the list that the browser supports is used.
You can also see a list of cursor keywords supported by different browsers.
What if you enclose the url string with apostrohes?
See also http://www.w3schools.com/CSS/pr_class_cursor.asp
UPDATE: The magnify icon is now supported natively in most browsers, so you can just use this CSS:
My side url property is working for cursor in following way
But here I think image size issue. Because If I use 32*32 size or below this then this work perfectly.
A comma separated list of URLs to custom cursors. Note: Always specify a generic cursor at the end of the list, in case none of the URL-defined cursors can be used
If you put only this then it will not work
This did the trick :)
(Based on Kevin Borders response)
The right fallback order is the following
Tested with: Firefox 47, Chrome 51, Opera 36, Edge 13 and IE11.