<article class="pc-coupon">
<div class="pc-coupon__main">
<p class="pc-coupon__kicker">Welcome offer</p>
<p class="pc-coupon__value">15% off</p>
<p class="pc-coupon__note">Your first order over ₱1,500</p>
</div>
<div class="pc-coupon__stub">
<span>Use code</span>
<b>HELLO15</b>
</div>
</article>About this card
A discount coupon with punched ticket notches and a dashed tear line, cut out with radial-gradient backgrounds instead of images.
How it works
The ticket is two flex parts. Radial gradients with a transparent circle at the edge cut half-moon notches out of the left of the main part and the left of the stub, so no images are used. A dashed border forms the tear line, and a drop-shadow filter on the wrapper follows the notched outline.
Ways to customise it
- Change #4f35e8 and #3a26b4 to recolour the two parts.
- Change the 11px notch radius.
- Change the offer text and the code in the stub.
Good to know
A drop-shadow filter follows the transparent notches, which a box-shadow would not. The code is real text, so users can select and copy it, and check that white text has enough contrast on your colours.
Open an example, copy the HTML and the CSS, and paste them into your page. There is nothing to install and no JavaScript to load.