<div></div>
div {
  background: linear-gradient(45deg, red, green, blue);
  width: 300px;
  height: 150px;
  padding: 10px;
}

div::before {
  content: '';
  width: 100%;
  height: 100%;
  background: #fff;
  display: block;
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.