Home  »  CodeSnippets   »   How to Make Background Transparent in CSS

How to Make Background Transparent in CSS

Posted: March 5, 2022 | by Michael Bright

Make background transparent code.

div {
   background-color: transparent; /* 100% transparent */
}

How to make background transparent using RGBA.

div {
   background-color: rgba(255, 255, 255, 0.25); /* partially Transparent at 25% from white */
}

How to make background transparent using opacity.

/* 25% transparent */
div {
  opacity: 0.25; 
  filter: alpha( opacity=25 ); /* For IE8 and earlier */
}

/* or */

div {
   opacity:25% ; 
}

Found this article interesting? Follow Brightwhiz on Facebook, Twitter, and YouTube to read and watch more content we post.