Extra Properties
- turned_in_notExtra Properties
cursor
color
outline
fill-rule
clip-rule
paint-order
shape-rendering
vector-effect
cursor
Used to set your cursor type when user mouseOver on any SVG component
Syntax
cursor:specificCursorType
- label_outlineCursor Types
- Point on the below boxes and checkout your cursor Symbol
cursor:alias;
cursor:all-scroll;
cursor:auto;
cursor:cell;
cursor:copy;
cursor:crosshair;
cursor:default;
cursor:grab;
cursor:grabbing;
cursor:help;
cursor:move;
cursor:none;
cursor:pointer;
cursor:progress;
cursor:text;
cursor:wait;
cursor:zoom-in;
cursor:zoom-out;
cursor:no-drop;
cursor:context-menu;
cursor:vertical-text;
cursor:not-allowed;
cursor:col-resize;
cursor:e-resize;
cursor:ew-resize;
cursor:n-resize;
cursor:ne-resize;
cursor:nesw-resize;
cursor:ns-resize;
cursor:nw-resize;
cursor:nwse-resize;
cursor:row-resize;
cursor:s-resize;
cursor:se-resize;
cursor:sw-resize;
cursor:w-resize;
cursor:url('customCursorImage.png'),auto;
color
Used to set the default color that can be inherited by any color related properties if needed then set its value as "currentColor"
Syntax
color:color
<svg height="100" width="200">
<g style="color:blue">
<circle cx="100" cy="50" r="30"
style="stroke:currentColor;stroke-width:5;fill:yellow"/>
</g>
</svg>
outline
Used to visualize the area covered by an SVG component
Syntax
outline:none|(width solid|dotted|double|dashed|groove|ridge|inset|outset color)
<svg height="100" width="200">
<circle cx="100" cy="50" r="30"
style="stroke:aqua;stroke-width:5;outline:5px dotted red"/>
</svg>
fill-rule
Used to determine whether the inside drawn shape part of a shape should be filled or not
- It depends on the direction of internal and external shape of a path, and the internal shape made by intersection points
- Used in path related tags
Syntax
fill-rule:nonzero|evenodd
- label_outlineMore Details
* nonzero depends on direction and intersection point where as evenodd is not
<svg height="100" width="200">
<path d="M40 20 L40 80 L160 80 L160 20 Z
L60 40 L140 40 L160 20"
style="fill-rule:evenodd;stroke:aqua;stroke-width:5;"/>
</svg>
clip-rule
Similar to fill-rule, but used only with path related elements used under <clipPath>
Syntax
clip-rule:nonzero|evenodd
<svg height="100" width="200">
<defs>
<!--Define a clipPath -->
<clipPath id="svgclip">
<path d="M60 20 h80 v60 h-80 Z
M80 35 h40 v30 h-40 Z"
style="clip-rule:evenodd;"/>
</clipPath>
</defs>
<!--Attach a defined clipPath -->
<image href="images/halloween.png" width="200" height="100"
style="clip-path:url(#svgclip)"/>
<!--Your real path used for clipping, Just un-comment to see-->
<!--path d="M60 20 h80 v60 h-80 Z M80 35 h40 v30 h-40 Z" style="fill-rule:evenodd;"/-->
</svg>
paint-order
Used to set the painting order of the fill, stroke and markers of a given shape or text element, default is 'normal' (which is in order, first fill then above stroke then above markers)
Syntax
paint-order:normal|(fill|stroke|markers fill|stroke|markers fill|stroke|markers)
- label_outlineMore Details
* MouseOver on black box above to see their values
<svg height="100" width="200">
<defs>
<marker id="arrow" viewBox="0 0 10 10" refX="5" refY="5"
markerWidth="5" markerHeight="5" orient="auto">
<path d="M0 0 L10 5 L0 10 L3 5 z" fill="red" fill-opacity="0.8" />
</marker>
</defs>
<polyline points="50 20, 50 80, 150 80, 150 20"
style="paint-order:markers stroke fill;
stroke:aqua;stroke-width:5;marker:url(#arrow)"/>
</svg>
shape-rendering
Used to o set how to render any shape, default value is 'auto'
Syntax
shape-rendering:auto|crispEdges|optimizeSpeed|geometricPrecision
<svg height="100" width="200">
<circle cx="25" cy="50" r="20" style="shape-rendering:auto"/>
<circle cx="75" cy="50" r="20" style="shape-rendering:crispEdges"/>
<circle cx="125" cy="50" r="20" style="shape-rendering:optimizeSpeed"/>
<circle cx="175" cy="50" r="20" style="shape-rendering:geometricPrecision"/>
</svg>
vector-effect
Used to stop the transformation effect on stroke, of a shape or a text, default value is 'default'
Syntax
vector-effect:default|non-scaling-stroke
<svg height="100" width="200">
<polyline points="20 20, 20 80, 120 80, 120 40"
transform="scale(0.5,1)" vector-effect="non-scaling-stroke"
stroke="#ff1493" stroke-width="10"/>
<polyline points="20 20, 20 80, 120 80, 120 40"
transform="translate(120,0) scale(0.5,1)"
stroke="#ff1493" stroke-width="10"/>
</svg>