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.


Auto Save

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.



  <meta charset="utf-8" />
  <meta name = "viewport" content = "width=device-width, initial-scale-1.0">
  <meta http-equiv= "X-UA-Compatible" content"IE=edge">
  <title>Mario Kart Animations</title>
  <link href="style.css" rel="stylesheet" type="text/css">

  <div class="sky">
    <img class = "cloud" src = "">
    <img class = "cloud" src = "">
  <div class="grass">
    <img class= "yoshi" src= "">
    <img class = "tree" src= "">
    <img class = "bush" src= "">
  <div class="road">
    <div class="lines"></div>
    <img class="mario" src= "">
     <img class="luigi" src= "">


                html, body {
  height: 100%;
  width: 100%;
  overflow: hidden;
  margin: 0;

.grass, .sky, .road {
  position: relative;

.sky {
  height: 40%;
  background: skyblue;

.grass {
  background: seagreen;

.road {
height: 30%;
  background: dimgrey;
  box-sizing: border-box;
  border-top: 10px solid grey;
  border-bottom: 10px solid grey;
  width: 100%;

  box-sizing: border-box;
  border: 5px dashed #fff;
  height: 0px;
  width: 100%;
  position: absolute;
  top: 45%;

.yoshi {
  position: absolute;
  animation: drive 12s both infinite linear;
.tree {
  position: absolute;
    top: -125px;
  animation: wind 3s linear infinite reverse;

.bush {position: absolute;
top: 100px;
right: 800px;
 animation: wind 3s linear infinite reverse;
.mario {
  position: absolute;
  top: -40px;
  left: 0px;
  animation: drive 6s both infinite linear, jump 0.3s 1.2s ease ; 

.luigi {
  position: absolute;
  top: 50px;
  left: 0;
  animation-name: drive;
  animation-duration: 6s;
  animation-delay: 2s;
  animation-fill-mode: both;
  animation-iteration-count: infinite;
/* Can use forward, backward, or both for animation-fill-mode*/

.cloud {
  position: absolute; 
 .cloud:nth-child(1) {
  width: 200px;
  top: 120px;
  opacity: 0.5;
  animation: wind 80s linear infinite reverse;

.cloud:nth-child(2) {
  width: 300px;
  top: 0px;
  animation: wind 50s linear infinite reverse;
/*// KEYFRAMES //*/

@keyframes drive {
  from{ transform: translatex(-300px)}
  to{ transform: translatex(3000px)}

@keyframes wind {
  from {left: -300px}
  to{left: 100%}

@keyframes jump {
  0% { top: -40px}
  50% { top: -100px}
  100% { top: -40px}