css background-color: transparent code example

Example 1: background color none

element {
	background-color: transparent;	
}

Example 2: css background color

body {
  background-color: green;
}

Example 3: background color transparent

div {
	background: transparent
}

Example 4: css transparent background color

div {
 opacity:25% ; 
}

Example 5: transparent background css

div {
  width: 200px;
  height: 200px;
  display: block;
  position: relative;
}

div::after {
  content: "";
  background: url(image.jpg);
  opacity: 0.5;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  position: absolute;
  z-index: -1;   
}

Example 6: background color

//javascript type css:
document.body.style.backgroundColor = "blue";
// or inline css:
<div style="background-color: blue;"></div>