如何为Windows用户跟随一个光标,为MacOSX用户跟随另一个光标?
解决方案:
很简单。检查用户平台 navigator
. 然后做一些类似的事情。
if ( navigator.platform == "Win32" ) {
// apply css-styling of cursor.
document.getElementById("body").style.cursor = "progress";
}
可能的值是:
- MacIntel
- MacPPC
- Mac68K
- Win32
- Win16
- SunOS
- HP-UX
- Linux i686
支持的浏览器。
- 谷歌浏览器
- Internet Explorer & Edge
- 火狐
- 戏曲
- 野生动物园