文章目录
鼠标样式:cursor属性值(含自定义光标图案) - 代码篇
1. 常用取值 · 举例:
属性值 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | ··· |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
cursor: |
Auto | text | Crosshair | cell | Default | Pointer | Move | e-resize | ne-resize | nw-resize | n-resize | se-resize | sw-resize | s-resize | w-resize | wait | help | ··· |
效果截图 |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
看下文 |
2. 更多取值 · 截图参考 (部分图标显示,因电脑系统而异)
:
对应解释 · 如下表所示:
3. 自定义cursor图片:
body {
cursor: url(https://static.xxxx.com/css/default.cur),default;
}
a, button, img {
cursor: url(https://static.xxxx.com/css/pointer.cur),default;
}