Increase cursor size in HTML body

∥☆過路亽.° 提交于 2019-12-01 19:34:30

问题


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.


回答1:


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




回答2:


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



来源:https://stackoverflow.com/questions/27351916/increase-cursor-size-in-html-body

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!