Dynamic shadow

PHOTO EMBED

Wed May 27 2020 07:31:50 GMT+0000 (Coordinated Universal Time)

Saved by @performmarketing #css

.dynamic-shadow {

  position: relative;

  width: rem;

  height: 10rem;

  background: linear-gradient(5deg, #d7ff, #00ffb8);
6
  z-index: 1;
7
}
8
.dynamic-shadow::after {

  content: '';
10
  width: 100%;

  height: 100%;

  position: absolute;

  background: inherit;

  top: 0.5rem;

  filter: blur(0.4rem);

  opacity: 0.7;

  z-index: -1;

}

​
content_copyCOPY

Creates a shadow similar to box-shadow but based on the colors of the element itself.