Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's 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 it's URL and the proper URL extention.

+ 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.


                <div class="container">
	<div class="wrapper">
		<h1 class="title" data-reveal="letter">Pure CSS and few lines of JS ✌</h1>
		<p data-reveal="word">You just need to write your own text as usual. The css/js script will split each word and letter to create this smooth revealing effect with accessibility in mind.</p>
		<em>To trigger the effect you need to add: <code data-reveal="letter">data-reveal="letter"</code> or <code data-reveal="word">data-reveal="word"</code> to the wrapping tag.</em>

	<a href="">made by <span>alticreation</span> 🤓</a>



                [data-reveal] {
	div {
		display: inline-block;
	span {
		transform: translate(0, 20%) rotate3d(1, 0, 0, -90deg);
		opacity: 0;
		transform-origin: center bottom;
		display: inline-block;
		transition: 0;
	&[data-reveal="play"] {
	span {
		transition: transform 1s ease-out, opacity 0.5s;
		opacity: 1;
		transform: translate(0%, 0%) rotate3d(0, 0, 0, 90deg);

// optional just for demonstration
* {
	padding: 0;
	margin: 0;
.container {
	text-align: center;
	padding: 2rem;
	font-family: sans-serif;
h1 {
	font-size: 4rem;
	margin-bottom: 1rem;
p {
	font-size: 2rem;
	max-width: 35ch;
	margin: 0 auto;
	margin-bottom: 1rem;
a {
	margin: 1rem;
	display: block;
	font-size: 0.75rem;
	color: #000;
	text-decoration: none;
	span {
		font-size: 0.75rem;
		text-decoration: underline;
code {
	background-color: #eee;



                function getScene(id) {
	let el = document.querySelectorAll("[data-reveal]")[id];
	data = {
		element: el,
		content: el.textContent,
		type: el.getAttribute("data-reveal")
	return data;
function playAnimation(data) {
	data.element.setAttribute("data-reveal", "play");
function prepareScene(data) {
	let content = data.content;
	let objs = "<div>";
	if (data.type === "word") objs += '<span style="transition-delay:0s">';
	for (let i = 0; i < content.length; i++) {
		if (data.type === "letter") {
			objs +=
				content[i] != " "
					? `<span style="transition-delay:${i / 20}s">${content[i]}</span>`
					: "</div> <div>";
		if (data.type === "word") {
			objs +=
				content[i] != " "
					? content[i]
					: `</span> <span style="transition-delay:${i / 20}s">`;
	data.element.innerHTML = `${objs}</div>`;

// trigger animation
	function () {
		let title = getScene(0);
		let p = getScene(1);
		let code_letter = getScene(2);
		let code_word = getScene(3);
		setTimeout(function () {
		}, 500);
		setTimeout(function () {
		}, 5500);