Abaixo uma lista com os valores CSS admitidos para estilização do cursor.
Passe o mouse sobre o valor, para ver o aspecto do cursor.
| cursor: wait |
| cursor: crosshair |
| cursor: n-resize |
| cursor: se-resize |
| cursor: help |
| cursor: text |
| cursor: ne-resize |
| cursor: sw-resize |
| cursor: pointer |
| cursor: move |
| cursor: nw-resize |
| cursor: e-resize |
| cursor: default |
| cursor: w-resize |
| cursor: s-resize |
We have more styles to choose from in CSS3. These work in IE9 and the latest versions of Firefox, Chrome, Safari and Opera except where indicated:
cursor: none (not IE, Safari, Opera)
cursor: context-menu (not Firefox, Chrome)
cursor: cell (not Safari)
cursor: vertical-text
cursor: alias (not Safari)
cursor: copy (not Safari)
cursor: no-drop
cursor: not-allowed
cursor: ew-resize
cursor: ns-resize
cursor: nesw-resize
cursor: nwse-resize
cursor: col-resize
cursor: row-resize
cursor: all-scroll
Mozilla and some editions of Chrome and Safari offer a number of vendor-prefixed cursor styles which are likely to become part of the CSS3 specification:
cursor: -webkit-grab; cursor: -moz-grab;
cursor: -webkit-grabbing; cursor: -moz-grabbing;
cursor: -webkit-zoom-in; cursor: -moz-zoom-in;
cursor: -webkit-zoom-out; cursor: -moz-zoom-out;
Finally, you can create your own cursor graphic, e.g
Sintaxe:
cursor: url(images/cursor.png) x y, auto;
cursor: url(images/cursor.png) 19 19, auto;
cursor: url(images/cursor_animado.gif) 30 30, auto;
Note:
Nice, but it sounds like too much effort to me! I’ll be sticking with the standard cursor styles…
Também é possível utilizar um cursor personalizado:
O código para um cursor da Internet, seria o seguinte, recomendo-lhe que utilize a Folha de Estilos CSS, que pode ser encontrada em:
cursor: url('Endereço do cursor');
Em Endereço do cursor, aqui deverá adicionar o endereço do seu cursor, mas lembre-se de que ele deve terminar em ".png".
<html>
<head>
<title>Untitled Document</title>
</head>
<style TYPE="text/css">
<!--
#cursor {
cursor: url("images/cursor.png") 19 19, auto;
}
-->
</style>
<body>
<p id="cursor" style="width:400px; height400px; background-color:#00FF99"> </p>
</body>
</html>
Passe o mouse em cima do quadrado e veja o resultado: