- object.svg
- style.css
SVG
<svg width="300" height="150">
<circle r="60" cx="75" cy="50%" fill="#ff7700"></circle>
<circle r="60" cx="150" cy="50%" fill="hsla(50, 100%, 50%, 0.5)"></circle>
<circle class="shape-opacity" r="60" cx="225" cy="50%"></circle>
</svg>
CSS
svg {
border: 1px solid #dddddd;
}
.shape-opacity {
fill: yellowgreen;
}
You’ve gone to a different page
Goalscompleted
0
- Set the opacity for the first shape using the
fill-opacity="0.5"
attribute. - Set the opacity for the third shape using CSS:
fill-opacity: 0.75
.
Comments