XML technologies / CSS / Advanced websites with CSS / CSS property reference / cursor
(Excerpt from “CSS − Advanced websites with Cascading Stylesheets” by Rachel Andrew & Dan Shafer)
The property cursor describes the pointer’s appearance when it is over a selected HTML element.
Inherited: yes
Values
The table Pointers in the CSS2 standard lists CSS2 pointers and their browser support. The default value auto lets the browser choose a pointer. The value default uses the user’s operating system default pointer.
The value url(url) also allows a custom pointer, supplied as a file .cur for a static Windows pointer, or a file .ani for an animated Windows pointer. So far, only Internet Explorer 6.0 supports this feature.
The table Special Internet Explorer pointers contains additional pointers outside the CSS2 standard, supported by different Internet Explorer versions.
Table: Pointers in the CSS2 standard.
Value for | Appearance in IE6 | IE (Win) | IE (Mac) | NS/Moz |
|---|---|---|---|---|
| unavailable | 4 | 4 | 6/1 |
| | 4 | 4 | 6/1 |
| | 4 | 4 | 6/1 |
|
| 4 | 4 | 6/1 |
| | 4 | 4 | 6/1 |
| | 4 | 4 | 6/1 |
| | 4 | 4 | 6/1 |
| | 4 | 4 | 6/1 |
| | 4 | 4 | 6/1 |
| | 4 | 4 | 6/1 |
| | 4 | 4 | 6/1 |
| | 4 | 4 | 6/1 |
| | 4 | 4 | 6/1 |
| | 4 | 4 | 6/1 |
| 6 | – | – | |
| | 4 | 4 | 6/1 |
| | 4 | 4 | 6/1 |
The precise pointer appearance can vary between browsers and operating systems.
Table: Special Internet Explorer pointers.
Value for | Appearance in IE6 | IE (Win) | IE (Mac) |
|---|---|---|---|
| | 6 | – |
| | 6 | – |
| | 4 | 4 |
| | 6 | – |
| | 6 | – |
| | 6 | – |
| | 6 | – |
| | 6 | – |
Default value: auto
Compatibility
CSS version: 1
Supported by all CSS-capable browsers except Netscape 4. Values outside the CSS2 standard are not supported by every browser; see the tables above.
Example
The following style rule displays the pointer pointer when the mouse is over an element with the attribute onclick. This example works only in browsers supporting attribute-based distinctions:
[onclick] {
cursor: pointer;
}
Copyright © 2006 of the German translation, dpunkt.verlag GmbH
You may print the online version for your private use.
Otherwise, this chapter from “CSS − Anspruchsvolle Websites mit Cascading Stylesheets” is subject to the same conditions as the bound edition: the work, including all its parts, is protected by copyright. All rights reserved, including reproduction, translation, microfilming, and storage and processing in electronic systems.
dpunkt.verlag GmbH, Ringstraße 19, 69115 Heidelberg