增加HTML正文中的游标大小

时间:2021-08-17 01:08:50

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

有没有办法以编程方式使用CSS或jQuery在基于浏览器的应用程序中增加游标的大小?

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

我可以用CSS改变光标的类型......

body {
    cursor: crosshair;
}

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

但我发现CSS中没有提供增加光标大小的规定。

2 个解决方案

#1


4  

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

没有关于光标大小的属性,但仍然可以使用自定义光标,其背后的技巧是在显示自定义图像时隐藏真实光标。您可以在此处找到有关此内容的更多信息Create Custom游标

#2


3  

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

您不能使用CSS或jQuery增加默认光标的大小。

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

但您可以使用游标Url属性的纯CSS将光标替换为任何大小的自定义图像。

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

这是纯CSS,不需要Javascript / jQuery hack。

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

有关更多信息:https://developer.mozilla.org/en-US/docs/Web/CSS/cursor/url

#1


4  

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

没有关于光标大小的属性,但仍然可以使用自定义光标,其背后的技巧是在显示自定义图像时隐藏真实光标。您可以在此处找到有关此内容的更多信息Create Custom游标

#2


3  

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

您不能使用CSS或jQuery增加默认光标的大小。

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

但您可以使用游标Url属性的纯CSS将光标替换为任何大小的自定义图像。

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

这是纯CSS,不需要Javascript / jQuery hack。

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

有关更多信息:https://developer.mozilla.org/en-US/docs/Web/CSS/cursor/url