- object.svg
- style.css
SVG
<svg width="300" height="150">
<circle r="60" cx="75" cy="50%" fill="gold" stroke="darkorange"></circle>
<circle class="shape-stroke-width" r="60" cx="225" cy="50%"></circle>
</svg>
CSS
svg {
border: 1px solid #dddddd;
}
.shape-stroke-width {
fill: lightseagreen;
stroke: teal;
}
You’ve gone to a different page
Goalscompleted
0
- Assign the first shape a stroke width using the
stroke-width="3"
attribute. - Assign the second shape a stroke width of
stroke-width: 5%
using CSS.
Note that, unlike HTML, the frame does not affect the position of the shape in space or its dimensions.
Comments