Increase cursor size in HTML body

2019-02-26 16:16发布

Is there any way to programmatically increase the size of the cursor in a browser based application using CSS or jQuery?

I can change the type of cursor with CSS like so...

body {
    cursor: crosshair;
}

but I see no provision in CSS to increase the size of the cursor.

2条回答
劳资没心,怎么记你
2楼-- · 2019-02-26 17:04

there is no property regarding size of cursor but still you can use custom cursors, the trick behind this is to hide real cursor while show custom image. You can find more about this here Create Custom cursors

查看更多
萌系小妹纸
3楼-- · 2019-02-26 17:14

You can't increase the size of the default cursor using CSS or jQuery.

But you can replace the cursor with the custom image of any size using pure CSS by cursor Url property.

This is pure CSS and no need of Javascript/jQuery hack for this.

For more info: https://developer.mozilla.org/en-US/docs/Web/CSS/cursor/url

查看更多
登录 后发表回答