B.30. cursor

This property lets you modify the appearance of the mouse cursor when the mouse is over a selected element.

Inherited: Yes

B.30.1. Value

Table B-4 lists the different cursor values supported by the CSS2 standard and the major browsers that support them. The special value auto is the default, and lets the browser determine what the cursor should look like automatically. The value default sets the cursor to its default appearance, as dictated by the operating system.

The value url(url), which is currently supported only in Internet Explorer 6 for Windows, lets you define your own cursor by pointing to a .cur (Windows static cursor) or .ani (Windows animated cursor) file on your site. Presumably, this property will support more standard image formats when it is implemented in other browsers.

Table B-5 lists additional, nonstandard cursors supported by various versions of Internet Explorer.

All of the cursors' exact appearances may vary between browsers and operating systems.

Table B-4. CSS2 standard cursors
cursor valueAppearance (as in IE6)IE (Win)IE (Mac)NS/Moz
auton/a446/1
crosshair446/1
default446/1
e-resize446/1
help446/1
move446/1
n-resize446/1
ne-resize446/1
nw-resize446/1
pointer446/1
s-resize446/1
se-resize446/1
sw-resize446/1
text446/1
url(url)n/a6
w-resize446/1
wait446/1

Table B-5. Internet Explorer-only cursors
cursor valueAppearance (as in IE6)IE (Win)IE (Mac)
all-scroll6
col-resize6
hand44
no-drop6
not-allowed6
progress6
row-resize6
vertical-text6

Initial value: auto

B.30.2. Compatibility

CSS Version: 1

Supported by all CSS-compatible browsers, with the notable exception of Netscape 4.

Some values of this property are not be supported by all browsers—refer to Table B-5 and Table B-5.

B.30.3. Example

This style rule (which doesn't work in browsers that don't support attribute selectors) displays the pointer cursor when the mouse is over any element with a onclick attribute.

[onclick] {
  cursor: pointer;
}

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.141.8.247