Introduction: Today, look at a layui front-end frame of Baidu, see a disabled icon style, the mouse will become a custom image style, it is to think that the cursor can also customize the picture path?! Has never been used before.
After using a bit, encountered a lot of problems, compared to the format of the film, suffix name and size problems, and then checked the relevant information.
Syntax: Cursor:url (path), auto;
Auto is required to follow the standard style, the browser will first load the path you set, if not, then load Auto Custom, Auto,default, etc. can be.
About the format of the picture:
1, if using pictures (gif,png), etc., cannot exceed 32*32, otherwise the browser does not know
2,ie Browser does not know the picture format of Gif,png etc.
Standard browsers such as 3,firefox do not support the. ani format.
Standard browsers such as 4.firefox do not seem to support animated. cur files.
5, the mouse style file is generally. cur. ani format. IE all support
Of course, jquery can also be achieved by:
$ (document). Ready (function () {
$ (' mouse '). Hover (
function () {$this. css ({cursor: "URL (cvte.cur), Auto"})},
function () {$this. css ({cursor: "URL (), Auto"})})
})
<div class= "Mouse" ></div>
Cursor: Changing the mouse style