css color image code example
Example 1: how to add an image in css
.element {
background-image: url("imageFile.png");
}
Example 2: how to add color to a image css
.box-2:before {
content: "";
display: block;
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
background: rgba(125, 2, 150, 0.5);
transition: background .3s linear;
}
.box-2 {
position: relative;
float: left;
cursor: pointer;
}
Example 3: css add image
background-image: url("imageFile.png");