image to have a background color css code example
Example 1: css background image
background-image: url("image.png");
background-position: center;
background-repeat: no-repeat;
background-size: cover;
Example 2: how to set background image for button in css
div#submitForm input {
background: url("../images/buttonbg.png") no-repeat scroll 0 0 transparent;
color: #000000;
cursor: pointer;
font-weight: bold;
height: 20px;
padding-bottom: 2px;
width: 75px;
}
Example 3: how to add background image as well as background colorin html
background: url('images/checked.png'), #6DB3F2;
Example 4: background url with color css
background: linear-gradient(0deg, rgba(2,173,231,0.5), rgba(2,173,231,0.5)), url(images/mba-grid-5px-bg.png) repeat;
Example 5: background in css
div, body, html, .myClass, #myId {
background-color: grey;
}
div {
background: url("img.jpg");
}
div {
background: url("Images/img.jpg");
}