cursor
在鼠标指针悬停在元素上时显示相应样式。
css
cursor: auto;enum
| 值 | 说明 | 示例 |
|---|---|---|
default | 默认箭头 | default |
auto | 浏览器自动判断 | auto |
none | 隐藏鼠标指针 | none |
| 值 | 说明 | 示例 |
|---|---|---|
pointer | 小手,表示可点击(按钮 / 链接) | pointer |
text | 文本选择光标 | text |
move | 可移动 | move |
help | 帮助 | help |
progress | 进度 | progress |
cell | 指示单元格可被选中 | cell |
crosshair | 交叉指针,通常指示位图中的框选 | crosshair |
not-allowed | 不能执行 | not-allowed |
grab | 可抓取 | grab |
zoom-in | 放大 | zoom-in |
zoom-out | 缩小 | zoom-out |
自定义光标
使用 URL,并提供一个关键字值作为备用
ts
cursor: url(hand.cur), pointer;必须有兜底值
建议尺寸 ≤
32x32支持
.cur、.png
