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 cursor

Appearance in IE6

IE (Win)

IE (Mac)

NS/Moz

auto

unavailable

4

4

6/1

crosshair

crosshair

4

4

6/1

default

default

4

4

6/1

e-resize

e-resize

4

4

6/1

help

help

4

4

6/1

move

move

4

4

6/1

n-resize

n-resize

4

4

6/1

ne-resize

ne-resize

4

4

6/1

nw-resize

nw-resize

4

4

6/1

pointer

pointer

4

4

6/1

s-resize

s-resize

4

4

6/1

se-resize

se-resize

4

4

6/1

sw-resize

sw-resize

4

4

6/1

text

text

4

4

6/1

url (url)

6

–

–

w-resize

w-resize

4

4

6/1

wait

wait

4

4

6/1

The precise pointer appearance can vary between browsers and operating systems.

 

Table: Special Internet Explorer pointers.

Value for cursor

Appearance in IE6

IE (Win)

IE (Mac)

all-scroll

all-scroll

6

–

col-resize

col-resize

6

–

hand

hand

4

4

no-drop

no-drop

6

–

not-allowed

not-allowed

6

–

progress

progress

6

–

row-resize

row-resize

6

–

vertical-text

vertical-text

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;
}

  

 

 

 

back to top