# Perspective Cast Shadow

> A shadow cast across the floor behind an object, made by skewing a blurred pseudo-element.

- Category: [CSS Box Shadows](https://copy-css.com/category/shadows)
- Tags: cast shadow, skew, floor, pseudo-element, product
- Live preview: https://copy-css.com/snippets/perspective-shadow
- License: Free for personal and commercial use. No signup, no attribution required.

## HTML

```html
<div class="shadow-cast"></div>
```

## CSS

```css
/* Give the parent isolation: isolate if the shadow hides behind its background */
.shadow-cast {
  position: relative;
  width: 100px;
  height: 130px;
  border-radius: 14px;
  background: linear-gradient(160deg, #fde68a, #f59e0b);
}

.shadow-cast::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  border-radius: 14px;
  background: #451a03;
  opacity: 0.35;
  filter: blur(6px);
  transform-origin: bottom;
  transform: skewX(-50deg) scaleY(0.45);
}
```

## Notes

- This CSS Perspective Cast Shadow is 21 lines of pure CSS (0.5 KB) with no JavaScript and no dependencies. It uses transforms, linear gradients and filters.
- In JSX use `className` instead of `class`. In Tailwind projects put the CSS in the global stylesheet.
