通过css更改鼠标指针样式操作

581 阅读1分钟

一、需求: el-table在禁用状态时,默认的样式为红色/,希望鼠标指针样式改为指示文本

二、cursor属性: 鼠标指针样式变化和style中的 cursor属性 有关,cursor属性的几个关键字:default、pointer、wait、help、text、crosshair。

鼠标指针样式效果图.gif

default:默认光标;\
pointer:超链接的指针;\
wait:表示程序正在忙;\
help:指示可用帮助;\
text:指示文本;\
crosshair:鼠标呈现十字状;
<span style="cursor: default;">默认光标</span>
<span style="cursor: pointer;">超链接的指针小手</span>
<span style="cursor: wait;">指程序正在忙沙漏</span>
<span style="cursor: help;">指示可用的帮助</span>
<span style="cursor: text;">指示文本</span>
<span style="cursor: crosshair;">十字状</span>

image.png

image.png

46913DB2447414E15D0EFACA45BC484C.jpg