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. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation


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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

              <div id="wrapper">
  <p id="stars"><span>&#9733;</span><span>&#9733;</span><span>&#9733;</span><span>&#9733;</span><span>&#9733;</span></p>
  <p id="title" contenteditable="true" spellcheck="false"><span>CSS</span><span>3</span><span>D</span></p>
  <p id="slogan"><span>Popcorn</span> for your <span>text</span>.</p>

<div id="meta">
  <a href=""><img src="" alt="3D Glasses" /> 3D red-cyan glasses</a> recommended.</p>
              html {
  height: 100%;
  font: 62.5%/1 "Lucida Sans Unicode","Lucida Grande",Verdana,Arial,Helvetica,sans-serif;
  background: #f5f5f5 url( no-repeat center center;

body {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

#wrapper {
  text-align: center;
  color: #000;
  font-weight: bold;
  font-size: 10em;
  padding: 50px 0;

span { 
  text-shadow: -0.06em 0 red,  0.06em 0 cyan; /* This creates the 3D effect, pretty easy, eh? */
  letter-spacing: 0.08em; /* make sure the letters don't overlap */

p {
  margin: 0;

/* ---------------- Stars ---------------- */

#stars span {
  display: inline-block;
  transform: scale(1);
  transition: transform 2s cubic-bezier(0, 1, 0, 1);
#stars span:hover {
  cursor: crosshair;
  transform: scale(1.3); /* This adds a hover effect */
  transition: transform .2s cubic-bezier(0, 0.75, 0, 1);
#stars span:active {
  text-shadow: none; /* Click to disable the 3D effect */

/* Below the stars animation */
#stars span:nth-child(1), #stars span:nth-child(5) { font-size: 0.3em; animation-delay: 0.2s; }
#stars span:nth-child(2), #stars span:nth-child(4) { font-size: 0.5em; animation-delay: 0.1s; }
#stars span:nth-child(3) { font-size: 0.8em; animation-delay: 0s; }

#stars span { animation: stars-animation 3s 50 ease-in-out; }

@-webkit-keyframes stars-animation {
  0% { transform: scale(1); }
  90% { transform: scale(1); }
  95% { transform: scale(1.3); }
  100% { transform: scale(1); }

#stars:hover span {
  animation: none; /* Disables the animation on hover */

/* ---------------- Title ---------------- */

#title {
  font-family: Helvetica, Geneva, sans-serif; /* Any font would work, but SansSerif looks better */
#title:focus {
  outline: none;
#title span {
  vertical-align: middle;
  line-height: 1.5em;
  transition: font-size 2s cubic-bezier(0, 1, 0, 1);
#title span:hover {
  font-size: 1.5em; /* This adds a hover effect */
  line-height: 1em;
  transition: font-size .2s cubic-bezier(0, 0.75, 0, 1);
#title span:active {
  font-size: 1em;
  text-shadow: none; /* Click to disable the 3D effect */
#title span::selection {
  background-color: red; /* This hides the selection */

/* ---------------- Slogan ---------------- */

#slogan { font-size: 0.25em; }
#slogan span:active { text-shadow: none; }

/* Below just some styling for the meta info */

#meta {
  color: #777;
  font-size: 1.2em;
  line-height: 1.6em;
  text-align: center;
  text-shadow: rgba(255,255,255,0.5) 0 1px 0;
  margin: 30px;
#meta strong { font-weight: bold; color: #000; }
#meta p:first-child { margin-bottom: 20px; }
#meta a { text-decoration: none; color: #7276ff; }
#meta a:hover { color: rgba(114,118,255,0.5); }
#meta img { vertical-align: text-bottom; }
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.