Cursor custom mouse shape in css

Source: Internet
Author: User

In css, you can change cursor into a hand-capturing shape. Note that it is not the hand of a hyperlink, but the starting point.

Css: {cursor: url ('absolute path image (format: cur, ico) '),-moz-zoom-out;} // FF
Css: {cursor: url ('absolute path'), auto;} // IE, FF, chrome

Example

The code is as follows: Copy code

. Style1 {
Cursor: url ('http: // your website/capture .jpg ');
}

Supplement:

Question 1: browser incompatibility:
It can be normally displayed in FF Firefox, but it cannot be displayed in IE at first, and later it is a problem that the size of the mouse image is too small, in the Google browser, the problem of the size of the mouse image is even more prominent-the super big.
This is exactly the opposite of baidu. Many of my friends encounter problems that are incompatible with the FF browser.
The problem that the mouse image is not displayed in the browser is probably caused by the reference to the URL path of the mouse image. You can try to reference the absolute and relative paths respectively.
 
Question 2: inconsistent mouse and image sizes between browsers:
This problem should be related to the resolution of Cursor images in various browsers. At first, my mouse image size was 59*56, and then I changed the size of the mouse image to 32*32, the problem of inconsistent image size is solved.
(This problem occurs if the size exceeds 32*32)
Problem 3: A mouse flash occurs when Cursor URL () is used in IE:
This occurs when Title or Alt is added to the container element that sets Cursor URL. Finally, I reluctantly removed the Title tag. Is it because Cursor conflicts with Title and Alt in IE?

Note: url: The URL of the custom optical indicator to be used. The image type must be in. cur or. ani format, but the jpg file is used by the editor and no problems are found.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.