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


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.


                <input id="trigger" class="toggle-checkbox" type="checkbox"><label for="trigger">Fire!</label>

<div class="z">
  <svg id="hat" fill-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2" clip-rule="evenodd" viewBox="0 0 183 60"><path fill="#8d5e3f" d="M128.4 7.2h7.4V48H146v-2.7h36.2v11.6H164v2.7H18V57H0V45.3h36.2V48h10.6V7.2h7.4V0h74.2v7.2z"/><path id="hole" d="M95.4 31.2h1.4v8.5h-1.4v1.4H87v-1.4h-1.4v-8.5h1.4v-1.4h8.5v1.4z"/></svg>
  <svg id="cowboy" fill-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2" clip-rule="evenodd" viewBox="0 0 208 394"><path fill="#91c1a3" d="M0 208.4h43v24.7H0zM168.7 208.4H208v24.7h-39.3z"/><path fill="#593000" d="M39.7 169v-10h129v10h9.5v9.8h10v9.9h9.9v9.9h9.9v9.8l-29.8.2v9.5l-19.3.2v-9.6h-10.4v62.5h-89v-62.5H49.2l-.2 9.6-18.8-.2v-9.5L0 208.4v-9.9h10v-9.8h9.8v-9.9h10v-9.9h9.9z"/><path fill="#2e1d0d" d="M99.2 336.5v57.3H34.5v-37.3h25v-20h39.7zM109 336.5h39.6v20h25v37.3H109v-57.3z"/><path fill="#433122" d="M59.5 272.5h89V338H109v-31.3H99V338H59.6v-65.6z"/><path fill="#9cd3b3" d="M4 228.2h6v-10h49.5v10H49.2v19.7h-9.5v9.9h-20v-9.9H9.9V238H4v-9.8zM148.5 218.3H198v9.9h6.9v9.9h-7v9.8h-9.7v10h-20v-10h-9.5v-19.7h-10.3v-9.9z"/><path fill="#91c1a3" d="M79.4 149.1H129v19.6H79.4z"/><path fill="#3a3a3a" d="M148.8 55.3H59.5V30.7h10v-9.9h19.7v8.7H99V39h10v-9.5h10v-8.7H138v10h10.7v24.5z"/><path fill="#9cd3b3" d="M139.6 50.5h9.2v19.7h19.8v30.1h-10.4v29.1h-9.4v9.7h-9.2v10h-20v10H89.2v-10H69.4v-10h-9.9v-9.7h-10v-29h-9.9V70.1h20V50.5h9.8v-10h70.2v10z"/><path fill="#fbeb8e" d="M109.1 60.3h30v30.1h-30zM69.4 60.3H99v30.1H69.4z"/><path fill="#758b7c" d="M89.3 119.5h29.8v10H89.3z"/><path fill="#444445" d="M69.4 70.2h10v10h-10zM119 80.3h10v10h-10z"/><path fill="#3a3a3a" d="M148.8 50.4h10v39.1h-10zM49.6 50.4h10v39.1h-10zM140.9 104.8H151v35h-3.6v4h-18.7v-32.3H79.8v32.4H61v-4h-3.5v-35.1h10v-5h73.4v5z"/><path fill="#91c1a3" d="M99.2 80h10v29.4h-10z"/><path fill="#4d4c4c" d="M148.5 263.6v9.9h-29v2h-21v2.8H87v2.1H58v-9.8h11.6v-2.2h21v-2.7h18v-2h40z"/><path d="M54.3 259.3h2.2v2.6h3.3v17.9h-3.3v30.7h-1.1V329h-5.3v-18.4h-1v-30.7h-3.4v-17.9H49v-2.6h2.2V253h3.1v6.3z"/><path fill="#2f2218" d="M44.2 284.9v-16.2h15.6v38.6H47.2v-22.4h-3z"/></svg>

<div class="logo"><a href="" target="_blank"><img src="" alt="Getting Braaains should be fun"></a></div>


                .toggle-checkbox:checked ~ .z #hat { 
  animation: 0.25s linear 0.04s shootoffhat forwards;
.toggle-checkbox:checked ~ .z #hole { 
  animation: 0.01s linear 0s appear forwards;
@keyframes appear {
  from {opacity: 0;}
  to {opacity: 1;}
#hole {
  opacity: 0;
@keyframes shootoffhat {
  0% {
    transform: rotateY(0) rotateX(0) translateY(0);
  100% {
    transform: rotate(180deg) translateY(100vh);
#hat {
  margin-bottom: -5.5em;
  position: relative;
  z-index: 10;
  transform: rotate(0) translateY(0);
  transform-origin: center 50px;
.z {
  max-width: 300px;
  margin: auto;

body {
  background-color: tan;
  overflow: hidden;

.logo {
  width: 100%;
  max-width: 400px;
  position: absolute;
  top: 0;
  right: 0;
.logo img {
  width: 100%;
  display: none;
input:checked + label {
  box-shadow: inset 3px 3px 2px #660000;
  transform: translate(3px, 3px);
label {
  font-size: 1.5em;
  color: #FFF;
  background-color: #960B0B;
  width: 140px;
  height: 30px;
  text-align: center;
  font-weight: bold;
  display: block;
  border-radius: 7px;
  box-shadow: 3px 3px 0 #660000;
  cursor: pointer;