css怎么设置鼠标光标形状

来自:互联网
时间:2021-02-24
阅读:

属性介绍:

cursor属性定义了鼠标指针放在一个元素边界范围内时所用的光标形状。

常用属性值:

  • text 此光标指示文本。

  • wAIt 此光标指示程序正忙(通常是一只表或沙漏)。

  • help 此光标指示可用的帮助(通常是一个问号或一个气球)。

  • auto 默认。浏览器设置的光标。

  • crosshair 光标呈现为十字线。

  • pointer 光标呈现为指示链接的指针(一只手)

设置鼠标光标形状的方法:

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"> 
<title>php中文网</title> 
</head>
<body>
<p>请把鼠标移动到单词上,可以看到鼠标指针发生变化:</p>
<span style="cursor:auto">auto</span><br>
<span style="cursor:crosshair">crosshair</span><br>
<span style="cursor:default">default</span><br>
<span style="cursor:e-resize">e-resize</span><br>
<span style="cursor:help">help</span><br>
<span style="cursor:move">move</span><br>
<span style="cursor:n-resize">n-resize</span><br>
<span style="cursor:ne-resize">ne-resize</span><br>
<span style="cursor:nw-resize">nw-resize</span><br>
<span style="cursor:pointer">pointer</span><br>
<span style="cursor:progress">progress</span><br>
<span style="cursor:s-resize">s-resize</span><br>
<span style="cursor:se-resize">se-resize</span><br>
<span style="cursor:sw-resize">sw-resize</span><br>
<span style="cursor:text">text</span><br>
<span style="cursor:w-resize">w-resize</span><br>
<span style="cursor:wait">wait</span><br>
</body>
</html>
返回顶部
顶部