cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

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.

Quick-add: + add another resource

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.

Quick-add: + add another resource

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.

            
              li<html>
<head>
  <link href="https://fonts.googleapis.com/css?family=Heebo:700|Open+Sans:700" rel="stylesheet">
</head>
<body>
    <div class="container">
      <div class="left-margin"></div>
      <span class="subhead">
        1983 LeMans results
      </span>
      <span class="headline">
        Nobody's<br>perfect.
      </span>
      <div class="order">
        <span class="place">1<sup>st</sup></span>
        <span id="car-flip0"></span>
        <span class="place">2<sup>nd</sup></span>
        <span id="car-flip1"></span></span>
        <span class="place">3<sup>rd</sup></span>
        <span id="car-flip2"></span>
        <span class="place">4<sup>th</sup></span>
        <span id="car-flip3"></span>
        <span class="place">5<sup>th</sup></span>
        <span id="car-flip4"></span>
        <span class="place">6<sup>th</sup></span>
        <span id="car-flip5"></span>
        <span class="place">7<sup>th</sup></span>
        <span id="car-flip6"></span>
        <span class="place">8<sup>th</sup></span>
        <span id="car-flip7"></span>
        <span class="place">9<sup>th</sup></span>
        <span id="car-flip8"></span>
        <span class="place">10<sup>th</sup></span>
        <span id="car-flip9"></span>
      </div>
      <p class="footer">
        There's no tougher endurance race than Le Mans. Over 3,000 punishing miles in 24 hours at speeds often in excess of 200 mph. Last year, Porsche took the first five places. This year, the first eight. Next year, who knows? There's always room for improvement. Even at Porsche.
      </p>
      <div class="logo">
        <img src="" alt="Porsche * Audi">
      </div>
      <div class="copyright">
        &copy 1983, Porsche/Audi
      </div>
      <div class="right-margin"></div>
    </div>
  </body>
</html>
            
          
!
            
              body {
  font-family: 'Heebo', sans-serif;
  background: #000;
  width: 50%;
  min-width: 800px;
  margin: auto;
}

.container {
  display: grid;
  width: 80%;
  grid-template-columns: 10% 1fr 1fr 10%;
  background: #fff;
  justify: center;
}

.headline {
  grid-row: 1 / 2;
  grid-column: 2 / 4;
  letter-spacing: -6px;
  line-height: 80%;
  font-size: 120px;
  font-weight: bold;
  text-align: center;
  margin: 20px;
}

.subhead {
  display: grid;
  letter-spacing: -1px;
  width: 9em;
  font-size: 14.5px;
  height: 8%;
  grid-column: 2 / 4;
  grid-row: 1 / 3;
  text-align: center;
  align-self: end;
  justify-self: center;
  border-top: 2px solid #000;
  border-bottom: 2px solid #000;  
}

.order {
  display: grid;
  width: 100%;
  grid-template-columns: 40% 50%;
  justify-self: center;
  grid-column: 2 / 4;
  grid-row: 3 / 4;
  margin-top: 8px;
  transform-style: preserve-3d;
  perspective: 500px;
  perspective-origin: bottom bottom;
}

sup {
  font-size: 16px;
}

.place {
  font-size: 35px;
  line-height: 90%;
  justify-self: end;
  align-self: end;
  margin-top: 2px;
}

@keyframes spin-car {
  0% {
    transform: rotateX(0deg);
  }
  
  100% {
    transform: rotateX(360deg);
  }
}

.car {
  font-size: 35px;
  margin-left: 8px;
  line-height: 90%;
  align-self: end;
}

#car-flip0, #car-flip1, #car-flip2, #car-flip3,
#car-flip4, #car-flip5, #car-flip6, #car-flip7, 
#car-flip8, #car-flip9
{
  display: block;
  visibility: visible;
  content: var(--spin-content);
  font-size: 35px;
  margin-left: 8px;
  line-height: 90%;
  align-self: end;
  animation: spin-car var(--spin-time) linear 5;
}

.footer {
  grid-column: 2 / 4;
  grid-row: 4 / 5;
  width: 75%;
  justify-self: center;
  text-align: justify;
  font-size: 10.5px;
  font-weight: bold;
  line-height: 90%;
}

.logo {
  grid-column: 3 / 4;
  grid-row: 4 / 5;
  justify-self: end;
  align-self: end;
  padding-right: 65px;
}

.copyright {
  font-size: 9px;
  grid-column: 2 / 4;
  grid-row: 4 / 5;
  width: 50%;
  align-self: end;
  justify-self: left;
  padding-left: 65px;
}

.left-margin {
  grid-column: 1 / 2;
  grid-row: 1 / 5;
  background-color: #000;
  width: 100%;
}

.right-margin {
  grid-column: 4 / 5;
  grid-row: 1 / 5;
  background-color: #000;
  width: 100%;
}
  
            
          
!
            
              function randomSpin(prop) {
  startingContent = ['Porsche', 'Mazda', 'Sauber/BMW', 'Ferrari', 'Aston Martin', 'Ford'];
  spinTime = Math.random() * (0.9 - 0.3) + 0.3;
  spinner = document.querySelector(prop);
  spinner.style.setProperty('--spin-time', spinTime + 's');
  
  startingContentNum = Math.floor(Math.random() * 6);
  contentName = startingContent[startingContentNum];
  spinner.textContent = contentName;
  style = window.getComputedStyle(spinner);
  anim = style.getPropertyValue('animation');
}

for (i=0; i<10; i++) {
  randomSpin('#car-flip'+i.toString());
} 


            
          
!
999px
Loading ..................

Console