html - Create a responsive receipt cutoff (zig-zag border) - Stack Overflow

PHOTO EMBED

Wed Jul 03 2024 02:05:03 GMT+0000 (Coordinated Universal Time)

Saved by @webmaster30 #css

body {
  background: black;
}

.StyledReceipt {
  background-color: #fff;
  width: 22rem;
  position: relative;
  padding: 1rem;
  box-shadow: 0 -0.4rem 1rem -0.4rem rgba(0, 0, 0, 0.2);
}

.StyledReceipt::after {
  background-image: linear-gradient(135deg, #fff 0.5rem, transparent 0),
    linear-gradient(-135deg, #fff 0.5rem, transparent 0);
  background-position: left-bottom;
  background-repeat: repeat-x;
  background-size: 1rem;
  content: '';
  display: block;
  position: absolute;
  bottom: -1rem;
  left: 0;
  width: 100%;
  height: 1rem;
}
content_copyCOPY

https://stackoverflow.com/questions/73561793/create-a-responsive-receipt-cutoff-zig-zag-border