Original link: http://davidwalsh.name/css-custom-cursor
Demo Address: http://davidwalsh.name/demo/css-custom-cursor.php
Original Date: 2014-09-16
Translation Date: 2014-09-17
Translators: Anchor
Remember the hard times of the Web 1.0 years? You want to do everything you can to optimize your website. Also suffer from IE6 inhuman abuse, to give a chestnut, ie those who killed people do not die of the scroll bar, I always remember the third-party class library cometcursor. Cometcursor is very powerful and is used primarily to create and load custom mouse cursor styles. Now you may feel that the original implementation means particularly old-fashioned, but sometimes do need to customize the cursor pattern, then look at the CSS how to implement it, it's so easy, where not point where!
CSS Code
The cursor property in CSS can be separated by commas to specify a series of cursor items that can be used to customize the pattern of the cursor with a URL ():
Body {cursor:url (' Some-cursor.ico '), default;}
In practice, it is best to add a fallback native cursor to the back, such as
default, and set the font (
font-family) style is the same as the truth.
One thing to note is that Firefox will crop the cursor to a smaller scale, and chrome now supports a larger icon size.
Don't hesitate to add a custom pointer icon to the important place. As you look at the zoom (+) and zoom Out (-) buttons at the photo album preview, you definitely want to be different.
CSS Custom mouse pointer styles