(Introduction to the various flavors of interactivity in SVG, zoom and pan of drawings, event handlers such as onclick in JavaScript, event-driven animations, hyperlinks and cursors.)
The outermost <svg> element in an SVG document can have the optional attribute allowZoomAndPan, which takes the possible values of trueand false, with the default being true. If true, the user agent should allow the user to zoom in, zoom out and pan around the given document. If false, the user agent should not allow the user to zoom and pan on the given document. If a allowZoomAndPan attribute is assigned to an inner <svg> element, the allowZoomAndPan setting on the inner <svg> element will be ignored.
Some interactive display environments provide the ability to modify the appearance of the pointer, which is also known as the cursor. Two types of cursors are available:
The 'cursor' property is used to specify which cursor to use. Custom cursors are defined with a <cursor> element.
Value: | [ [<uri> ,]* [ auto | crosshair | default | pointer | move| e-resize | ne-resize | nw-resize | n-resize | se-resize | sw-resize | s-resize | w-resize| text | wait | help ] ] | inherit |
Initial: | auto |
Applies to: | all elements |
Inherited: | yes |
Percentages: | N/A |
Media: | visual, interactive |
This property specifies the type of cursor to be displayed for the pointing device. Values have the following meanings:
P { cursor : url("mything.cur"), url("second.csr"), text; }
The 'cursor' property for SVG is identical to the 'cursor' property defined in the "Cascading Style Sheets (CSS) level 2" specification [CSS2], with the exception that SVG user agents must support cursors defined by the <cursor> element.
<!ELEMENT cursor (desc?,title?) > <!ATTLIST cursor id ID #IMPLIED system-required CDATA #IMPLIED x CDATA "0" y CDATA "0" xmlns:xlink CDATA #FIXED "http://www.w3.org/XML/XLink/0.9" xlink:type (simple|extended|locator|arc) #FIXED "simple" xlink:role CDATA #IMPLIED xlink:title CDATA #IMPLIED xlink:show (new|parsed|replace) #FIXED 'parsed' xlink:actuate (user|auto) #FIXED 'auto' xlink:href CDATA #REQUIRED > |
Attribute definitions:
SVG user agents are required to support PNG format images as targets of the xlink:href property.