Web4College

CSS stroke property

src

Description

CSS stroke is a shorthand property of stroke-color, stroke-image, stroke-origin, stroke-position, stroke-size, and stroke-repeat properties.

Remember that all browsers do not support it completely. It only specifies the color of the stroke in the browsers.

Syntax

stroke : currentColor | color-name | rgb value | hexadecimal value

Property values

currentColorDefault

currentColor keyword represents the same color for stroke as of text color.

stroke: currentColor;
Try it

color-name

The following demo represents skyblue color for the stroke of an element.

stroke: skyblue;
Try it

rgb value

#000000

It represents rgb value of a color. The hexadecimal value of red color is given below.

stroke: rgb(255,0,0);
Try it

hexadecimal value

#000000

It represents hexadecimal notation of red color. The hexadecimal notation of blue color is given below.

stroke: #0000ff;
Try it

It specifies the color of stroke only.