VOOZH about

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

⇱ SVG fill-opacity Attribute - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

SVG fill-opacity Attribute

Last Updated : 31 Mar, 2022

The fill-opacity attribute is a presentation attribute defining the opacity of the paint applied to a shape.


Syntax:

fill-opacity="colour"

Attribute Values:

  • decimal: Decimal value at which we want to make our element opaque.
  • percentage: Percentage at which we want to set the fill-opacity attribute.

We will use the fill-opacity attribute for setting the opacity of fill-color.

Example 1: 

Output:

👁 Image

Example 2: 

Output:

👁 Image
Comment