Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Increase cursor size in HTML body

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.

like image 880
ѺȐeallү Avatar asked Dec 08 '14 05:12

ѺȐeallү


People also ask

Can you customize cursor?

To change how the mouse pointer looks , and then clicking Control Panel. In the search box, type mouse, and then click Mouse. Click the Pointers tab, and then do one of the following: To give all of your pointers a new look, click the Scheme drop-down list, and then click a new mouse pointer scheme.

How Big Should cursor image be?

While the specification does not limit the cursor image size, user agents commonly restrict them to avoid potential misuse. For example, on Firefox and Chromium cursor images are restricted to 128x128 pixels by default, but it is recommended to limit the cursor image size to 32x32 pixels.


3 Answers

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

edit: above link is dead, it's still found on wayback machine: https://web.archive.org/web/20170605131602/http://www.ajaxblender.com/howto-create-custom-image-cursors.html

like image 66
Nasir Mahmood Avatar answered Sep 17 '22 15:09

Nasir Mahmood


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

like image 22
ssilas777 Avatar answered Sep 21 '22 15:09

ssilas777


There is virtually NO statement to increase size of the cursor. A way out of this is to use the cursor: url(...); statement to replace the cursor. Make the custom cursor a to the size you want using various apps, and make sure that the '.cur' extension is there.

like image 41
Super Coder Avatar answered Sep 20 '22 15:09

Super Coder