Pen Settings

HTML

CSS

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

JavaScript

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

Packages

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.

Behavior

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.

HTML

              
                <pac-man></pac-man>
              
            
!

CSS

              
                @keyframes pacman1 {
0% {transform: rotate(45deg);}
100% {transform: rotate(0deg);}
}

@keyframes pacman2 {
0% {transform: rotate(-45deg);}
100% {transform: rotate(0deg);}
}

@keyframes pacman3 {
0% { box-shadow: 100px 65px 0 0 white, 160px 65px 0 0 white, 220px 65px 0 0 white, 220px 125px 0 0 white, 220px 185px 0 0 white, 220px 245px 0 0 white, 280px 245px 0 0 white, 340px 245px 0 0 white, 400px 245px 0 0 transparent; }
100% { box-shadow: 40px 65px 0 0 white, 100px 65px 0 0 white, 160px 65px 0 0 white, 220px 65px 0 0 white, 220px 125px 0 0 white, 220px 185px 0 0 white, 220px 245px 0 0 white, 280px 245px 0 0 white, 340px 245px 0 0 white; }
}


body {
background-color: black;
}
pac-man {
display: block;
margin: 20px;
margin-left: 85px;
width: 30px;
height: 30px;
border-radius: 50%;
animation: pacman3 1.4s linear 0s infinite;
}
pac-man::before,
pac-man::after {
content: "";
display: block;
position: absolute;
width: 0;
height: 0;
margin-left: -65px;
border-radius: 50%;    
border: 80px solid yellow;
border-right-color: transparent;    
}
pac-man::before {
animation: pacman1 0.7s linear 0s infinite alternate;
}
pac-man::after {
animation: pacman2 0.7s linear 0s infinite alternate;
}

              
            
!

JS

              
                
              
            
!
999px

Console