Background Color and Image Together

Define a background color and image for a div in one statement.

Background image and color

2 Background images and color

Code Example

    <style> (First Example)
     #porsche {
      width: 300px;
      height: auto;
      overflow: auto;
      padding: 5px;
      box-sizing: border-box;
      background-image: url('../images/porsche.png'), linear-gradient(to right, #6DB3F2, #6DB3F2);
      background-repeat: no-repeat;
      background-position: 50% 50%;}
    </style>
  


    <style> (Second Example)
     #mult {
      width: 300px;
      height: 200px;
      overflow: auto;
      padding: 5px;
      margin: 0 auto;
      box-sizing: border-box;
      background-image: url('../images/porsche-small.png, ../images/praesto-logo.png')linear-gradient(#6DB3F2, #0d4d86);
      background-repeat: no-repeat, no-repeat;
      background-position: top left, bottom right;
      /* background-size: 200px 100px; */
      border: 1px solid #0b57d1;
      border-radius: 7px;}
    </style>