圖片形式:
表格形式:
默認 | default |
文字/編輯 | text |
自動 | auto |
手形 | pointer, hand(hand是IE專有) |
可移動對象 | move |
不允許 | not-allowed |
無法釋放 | no-drop |
等待/沙漏 | wait |
幫助 | help |
十字準星 | crosshair |
向上改變大小(North) | n-resize |
向下改變大小(South) | s_resize 與n-resize效果相同 |
向左改變大小(West) | w-resize |
向右改變大小(East) | e-resize 與w-resize效果相同 |
向左上改變大小(NorthWest) | nw-resize |
向左下改變大小(SouthWest) | sw-resize |
向右上改變大小(NorthEast) | ne-resize 與sw-resize效果相同 |
向右下改變大小(SouthEast) | se-resize 與nw-resize效果相同 |
自定義光標 | url('光標地址') |
代碼實列:
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>
<span style="cursor:pointer">手形</span>
<span style="cursor:crosshair">十字</span>
<span style="cursor:text" >文本光標</span>
<span style="cursor:e-resize" >左右箭頭</span>
<span style="cursor:s-resize" >上下箭頭</span>
</body>
</html>