gpt4 book ai didi

CSS .cur 光标格式

转载 作者:行者123 更新时间:2023-12-02 21:13:38 25 4
gpt4 key购买 nike

我设置了自定义光标url(mouse2.cur)并且它没有改变。

(mouse2.png) 完美运行!有什么问题吗?

body{
cursor: url(mouse2.cur),pointer;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
}

最佳答案

不同的浏览器对光标的url支持不同。

Firefox/Mac, Safari/Mac, Chrome/Mac don't support PNG and JPG cursors (tested with 48px cursors). IE only supports cursors in the CUR format.

According to CanIUse: http://caniuse.com/#search=cursor

W3C CSS3 规范指出:

The UA must support the following image file formats:

  • PNG, as defined in [PNG]
  • SVG, as defined in [SVG], in secure static mode [SVG-INTEGRATION]
  • any other non-animated image file format that they support for in other properties, such as the the background-image property

顺便说一下,W3C CSS3 规范规定大多数浏览器都应该支持 .cur 光标。

Note: At the time of writing this specification (spring 2015), the only file formats supported for cursors in common desktop browsers are the .ico and .cur file formats, as designed by Microsoft. For compatibility with legacy content, UAs are encouraged to support these, even though the lack of an open specification makes it impossible to have a normative requirement about these formats. Some information on these formats can be found on Wikipedia.

http://www.w3.org/TR/css3-ui/#cursor

最后,您的 .cur 文件可能已损坏,甚至链接到它会返回 404 错误。请检查您的 .cur 文件的链接。

关于CSS .cur 光标格式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32037763/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com