Pen Settings



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


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


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.


Save Automatically?

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.


                <svg width="728" class="phone" viewBox="0 0 169 228">
		<!-- 		re-use this -->
		<g id="video">
			<path id="Rectangle-8" fill="#E7E7E7" d="M4.999 0h78.502q.123 0 . .123-.006.245-.006.123-.018.245-.012.122-.03.243-.018.122-.042.242-.024.12-.054.24-.03.119-.065.236-.036.118-.077.233-.042.116-.088.229-.047.113-.1.224-.052.111-.11.22-.058.108-.121.213t-.132.207q-.068.102-.14.2-.074.1-.152.194-.078.095-.16.186t-.17.178q-.086.087-.177.169-.09.082-.186.16-.094.078-.193.151t-.2.142q-.103.068-.208.13-.105.064-.213.122-.109.058-.22.11-.11.052-.224.1-.113.046-.229.088-.115.041-.233.077-.117.035-.236.065-.12.03-.24.054t-.242.042q-.12.018-.243.03-.122.012-.245.018-.122.006-.245.006H4.999q-.123 0-.245-.006-.123-.006-.245-.018-.122-.012-.244-.03-.12-.018-.241-.042-.12-.024-.24-.054-.119-.03-.236-.065-.118-.036-.233-.077-.116-.042-.229-.088-.113-.047-.224-.1-.111-.052-.22-.11-.108-.058-.213-.121t-.207-.132q-.102-.068-.2-.14-.1-.074-.194-.152-.095-.078-.186-.16t-.178-.17q-.087-.086-.169-.177-.082-.09-.16-.186-.078-.094-.151-.193t-.142-.2q-.068-.103-.13-.208-.064-.105-.122-.213-.058-.109-.11-.22-.053-.11-.1-.224-.046-.113-.088-.229-.041-.115-.077-.233-.035-.117-.065-.236-.03-.12-.054-.24t-.042-.242q-.018-.12-.03-.243-.012-.122-.018-.245Q0 32.124 0 32.001V4.999q0-.123.006-.245.006-.123.018-.245.012-.122.03-.244.018-.12.042-.241.024-.12.054-.24.03-.119.065-.236.036-.118.077-.233.042-.116.089-.229.046-.113.099-.224.052-.111.11-.22.058-.108.121-.213t.131-.207q.069-.102.142-.2.073-.1.15-.194.079-.095.161-.186t.17-.178q.086-.087.177-.169.09-.082.186-.16.095-.078.193-.151.099-.073.2-.142.103-.068.208-.13.105-.064.213-.122.109-.058.22-.11.11-.053.224-.1.113-.046.229-.088.115-.041.233-.077.117-.035.236-.065.12-.03.24-.054t.241-.042q.122-.018.244-.03t.245-.018Q4.876 0 4.999 0z" />
			<g id="PlayIcon" transform="translate(36.32 11)">
				<path id="Ellipse" fill="#C4C4C4" d="M0 7.5C0 11.642 3.436 15 7.673 15c4.238 0 7.674-3.358 7.674-7.5 0-4.142-3.436-7.5-7.674-7.5C3.436 0 0 3.358 0 7.5z" />
				<path id="Triangle" fill="#E7E7E7" d="M9.208 4.5L0 0v9l9.208-4.5z" transform="translate(4.092 3)" />
		<!-- mask the videos -->
		<mask id="myMask">
			<rect x="35" y="78" width="98" height="122" fill="white" />
	<g transform="translate(28 12)">
		<path id="Rectangle" fill="#F9F9F9" fill-rule="evenodd" stroke="none" d="M0 36V18c0-4.97 1.757-9.213 5.272-12.728C8.787 1.757 13.03 0 18 0h77c4.97 0 9.213 1.757 12.728 5.272C111.243 8.787 113 13.03 113 18v168c0 4.971-1.757 9.213-5.272 12.728C104.213 202.243 99.971 204 95 204H18c-4.97 0-9.213-1.757-12.728-5.272C1.757 195.213 0 190.971 0 186V36z" />

	<!-- 	clip this container -->
	<g class="clipped" mask="url(#myMask)">
		<!-- 		animate this container -->
		<g id="container">
			<use href="#video" x="40" y="40" />
			<use href="#video" x="40" y="80" />
			<use href="#video" x="40" y="120" />
			<use href="#video" x="40" y="160" />

	<!-- 	a copy of the element within the mask -->
	<rect x="35" y="78" width="98" height="122" fill="pink" opacity="0.3" />


                body {
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;

svg {
	max-height: 90vh;



      "#container", {
	duration: 2,
	ease: "none",
	y: "+=40",
	repeat: -1