Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Auto Save

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                .container 
	.canvas
		.stamp
			.stamp-background
				.stamp-image-background
					p.country usa
					p.price 55¢
					.balloons
						each val in [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]
							.balloon

              
            
!

CSS

              
                @import url("https://fonts.googleapis.com/css2?family=Markazi+Text:wght@500&display=swap");

$blue: #2678b4;
$pink: #f475aa;
$pinkLight: lighten($pink, 15%);
$purple: #5a2072;
$purpleLight: lighten($purple, 55%);
$white: #e0dde4;
$yellow: #dda76b;

$balloonMd: scale(1.1);
$balloonLg: scale(1.2);

$fast: 10s ease-out;

$font-family: "Markazi Text", serif;

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

body {
	width: 100%;
	height: 100vh;
	display: grid;
	place-items: center;
	background: $yellow;
}

.container {
	width: 100%;
	max-width: 70%;
}

.canvas {
	position: relative;
	// Maintain 8:5 Aspect Ratio
	padding-top: 62.5%;
}

// STAMP ==========
.stamp {
	position: absolute;
	width: 50%;
	height: 80%;
	top: 10%;
	left: 25%;
	background: radial-gradient(
		transparent 0%,
		transparent 50%,
		$white 50%,
		$white 100%
	);
	background-size: 10% 10%;
	background-position: 6% 6%;
	padding: 2%;
	filter: drop-shadow(10px 10px 10px darken($yellow, 40%));

	.stamp-background {
		background: $white;
		width: 100%;
		height: 100%;
		padding: 5%;

		.stamp-image-background {
			position: relative;
			top: 3%;
			left: 3%;
			width: 95%;
			height: 95%;
			background: linear-gradient(lighten($blue, 20%), $blue);
			filter: drop-shadow(2px 5px 5px darken($yellow, 40%));
			overflow: hidden;

			.country,
			.price {
				position: absolute;
				color: $white;
				font-family: $font-family;
				z-index: 100;
			}

			.country {
				top: 73%;
				right: 13.5%;
				text-transform: uppercase;
				font-size: 3vw;
			}

			.price {
				top: 79%;
				right: 8%;
				font-size: 5vw;
			}
		}
	}
}

// BALLOONS ==========
.balloons {
	position: absolute;
	width: 90%;
	height: 90%;
	top: 5%;
	left: 5%;
	animation: drift 5s 10s ease-in-out infinite;

	@keyframes drift {
		0% {
			transform: translate(0%);
		}
		50% {
			transform: translate(0%, 3%);
		}
		100% {
			transform: translate(0%);
		}
	}
}

@mixin sharedBalloon {
	position: absolute;
	width: 28%;
	height: 30%;
	border-radius: 50%;
	&::before {
		content: "";
		position: absolute;
		width: 10%;
		height: 10%;
		top: 100%;
		left: 45%;
		background: inherit;
		clip-path: polygon(20% 0%, 80% 0%, 100% 100%, 0% 100%);
		z-index: 2;
	}

	&::after {
		content: "";
		position: absolute;
		width: 1%;
		height: 300%;
		left: 49.5%;
		top: 100%;
		background: $white;
		z-index: 1;
	}
}

// purple top right =====
.balloon:nth-of-type(1) {
	@include sharedBalloon;
	right: 2%;
	top: 5%;
	background: $purple;
	transform: rotate(24deg);
	animation: float $fast;
}

// light purple top =====
.balloon:nth-of-type(2) {
	@include sharedBalloon;
	top: 1%;
	right: 25%;
	background: $purpleLight;
	transform: $balloonLg rotate(10deg);
	animation: float $fast;
}

// white right =====
.balloon:nth-of-type(4) {
	@include sharedBalloon;
	right: 4%;
	top: 35%;
	background: $white;
	transform: $balloonMd rotate(33deg);
	animation: float $fast;
}

// light pink right =====
.balloon:nth-of-type(5) {
	@include sharedBalloon;
	top: 18%;
	right: 8%;
	background: $pinkLight;
	transform: $balloonMd rotate(24deg);
	animation: float $fast;
}

// purple bottom =====
.balloon:nth-of-type(6) {
	@include sharedBalloon;
	right: 20%;
	top: 38%;
	background: $purple;
	transform: $balloonLg rotate(21deg);
	animation: float $fast;
}

// pink right =====
.balloon:nth-of-type(7) {
	@include sharedBalloon;
	right: 30%;
	top: 15%;
	background: $pink;
	transform: $balloonLg rotate(8deg);
	animation: float $fast;
}

// purple top =====
.balloon:nth-of-type(8) {
	@include sharedBalloon;
	left: 5%;
	top: 15%;
	background: $purple;
	transform: $balloonLg rotate(-20deg);
	animation: float $fast;
}

// white top  =====
.balloon:nth-of-type(9) {
	@include sharedBalloon;
	left: 20%;
	top: 8%;
	background: $white;
	transform: $balloonLg rotate(-8deg);
	animation: float $fast;
}

// pink left =====
.balloon:nth-of-type(10) {
	@include sharedBalloon;
	left: 10%;
	top: 35%;
	background: $pink;
	transform: $balloonMd rotate(-21deg);
	animation: float $fast;
}

// light purple bottom =====
.balloon:nth-of-type(11) {
	@include sharedBalloon;
	right: 40%;
	top: 39%;
	background: $purpleLight;
	transform: $balloonLg rotate(0deg);
	animation: float $fast;
}

// KEYFRAMES ==========
@keyframes float {
	0% {
		top: 110%;
	}
}

              
            
!

JS

              
                
              
            
!
999px

Console