Customize mouse styles on the web

Source: Internet
Author: User

To write a project recently, you must move the cursor to the left arrow of an image and the right arrow to the right.

Implementation Method: locate two divs on an img. The div style is as follows:

. Toleft {width: 200px; height: 300px; position: absolute; left: 0px; top: 0px; cursor: url (.. /images/test/cursor_left.cur), default ;}. toright {width: 200px; height: 300px; position: absolute; left: 200px; top: 0px; cursor: url (.. /images/test/cursor_right.cur), default ;}

Other browsers are fine, but they are not good in ie.

Later I tried several methods:

1. Add z-idnex: 1 to img, and add z-index: 2 to div. // No

2. Remove the position: absolute of the div, and add float: left; // No

However, I added a background-color: # fff TO THE div. Hey, you can.

Finally, set the transparency of the div to 0.

 

 

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.