VOOZH about

URL: https://www.geeksforgeeks.org/html/svg-stroke-opacity-attribute/

⇱ SVG stroke-opacity Attribute - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

SVG stroke-opacity Attribute

Last Updated : 31 Mar, 2022

The stroke-opacity attribute specifies the transparency of an object or of a group of objects.

Syntax:

stroke-opacity= "opacity"

Attribute Values:

  • decimal: decimal value ranging from 0-1
  • percentage: percentage at which we want to set the opacity of the element

We will use the stoke-opacity attribute for setting the opacity of the element.

Example 1: In this example we will use the stroke-opacity attribute for setting the opacity of circle element using decimal attribute.

Output:

👁 Image

Example 2: In this example we will use the stroke-opacity attribute for setting the opacity of circle element using percentage attribute.

Output:

👁 Image
Comment