Published
Updated
Easily manage projects with monday.com
The stroke
property in CSS is for adding a border to SVG shapes.
.module {
stroke: black;
}
Remember:
<path stroke="#fff" ... />
<path style="stroke: #fff;" ... />
The stroke
property can accept any CSS color value.
orange
#FF9E2C
rgb(255, 158, 44) and rgba(255, 158, 44, .5)
hsl(32, 100%, 59%) and hsla(32, 100%, 59%, .5)
Awesomely enough, stroke
also accepts the patterns of SVG shapes that are defined inside of a defs
element:
.module {
stroke: url(#pattern);
}
See the Pen stroke property by CSS-Tricks (@css-tricks) on CodePen.
Chrome | Safari | Firefox | Opera | IE | Android | iOS |
---|---|---|---|---|---|---|
Yes | Yes | Yes | Yes | 9+ | 4.4+ | Yes |