Pen Settings

HTML

CSS

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

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

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.

HTML

              
                
              
            
!

CSS

              
                

$t: rgba(255, 255, 255, 0.001);
$g: #777;
$bl: #37458f;
$tophalf:310px 120px, 25px calc(50% - 15px), 25px calc(50% - 30px), 360px calc(50% - 15px),  360px calc(50% - 30px), 50% 340px, calc(50% - 87.5px) 345px, calc(50% + 87.5px) 345px, center, center, center 100px, center;

@function cherry($left) {
  @return 
    //cherry
    radial-gradient(circle at center, red 15px, $t 10px)
      calc(-100px + #{$left}) calc(50% - 7.5px) / 100% 100% no-repeat,
    radial-gradient(circle at center, red 12.5px, $t 10px)
      calc(-70px + #{$left}) calc(50% - 5px) / 100% 100% no-repeat,
    radial-gradient(ellipse at left, $t 17px, green 17px, green 22px, $t 22px)
      calc(120px + #{$left}) calc(50% - 25px) / 100% 150% no-repeat,
    radial-gradient(ellipse at left, $t 17px, green 17px, green 22px, $t 22px)
      calc(100px + #{$left}) calc(50% - 35px) / 100% 225% no-repeat,
    radial-gradient(circle at bottom, green 20px, $t 20px)
      calc(-100px + #{$left}) -297px / 100% 100% no-repeat,
//star
linear-gradient(324deg, #fff 4%,   transparent 4%) calc(50% - 190px + #{$left}) calc(50% - 180px) / 200px 200px no-repeat,
         linear-gradient(36deg, #fff 4%,   transparent 4%) calc(50% + 10px + #{$left}) calc(50% - 180px) / 200px 200px no-repeat,
        linear-gradient(72deg, 
#fecc5c 8.5%, transparent 8.5%) calc(50% + 10px + #{$left}) calc(50% - 180px) / 200px 200px no-repeat,
        linear-gradient(288deg, 
#fecc5c 8.5%,   transparent 8.5%) calc(50% - 190px + #{$left}) calc(50% - 180px) / 200px 200px no-repeat,
        linear-gradient(216deg, 
#fecc5c 7.5%,   transparent 7.5%) calc(50% - 190px + #{$left}) calc(50% - 20px) / 200px 200px no-repeat,
        linear-gradient(144deg, 
#fecc5c 7.5%,   transparent 7.5%) calc(50% + 10px + #{$left}) calc(50% - 20px) / 200px 200px no-repeat,
//seven
linear-gradient(to right, $t 25px, #17448c 20px) calc(50% - 105px + #{$left}) calc(50% + 35px) / 70px 15px no-repeat,
linear-gradient(-55deg, $t calc(50% - 30px), #17448c calc(50% - 30px), #17448c calc(50% - 15px), $t calc(50% - 15px)) calc(50% - 105px + #{$left}) calc(50% + 50px) / 70px 80px no-repeat,
//seven
linear-gradient(to right, $t 25px, green 20px) calc(50% - 105px + #{$left}) calc(50% - 215px) / 70px 15px no-repeat,
linear-gradient(-55deg, $t calc(50% - 30px), green calc(50% - 30px), green calc(50% - 15px), $t calc(50% - 15px)) calc(50% - 105px + #{$left}) calc(50% - 200px) / 70px 80px no-repeat,
//star
linear-gradient(324deg, #fff 4%,   transparent 4%) calc(50% - 190px + #{$left}) calc(50% + 70px) / 200px 200px no-repeat,
         linear-gradient(36deg, #fff 4%,   transparent 4%) calc(50% + 10px + #{$left}) calc(50% + 70px) / 200px 200px no-repeat,
        linear-gradient(72deg, 
#fecc5c 8.5%, transparent 8.5%) calc(50% + 10px + #{$left}) calc(50% + 70px) / 200px 200px no-repeat,
        linear-gradient(288deg, 
#fecc5c 8.5%,   transparent 8.5%) calc(50% - 190px + #{$left}) calc(50% + 70px) / 200px 200px no-repeat,
        linear-gradient(216deg, 
#fecc5c 7.5%,   transparent 7.5%) calc(50% - 190px + #{$left}) calc(50% + 227.5px) / 200px 200px no-repeat,
        linear-gradient(144deg, 
#fecc5c 7.5%,   transparent 7.5%) calc(50% + 10px + #{$left}) calc(50% + 227.5px) / 200px 200px no-repeat,
// cherry
radial-gradient(circle at center, red 15px, $t 10px)
      calc(-100px + #{$left}) calc(50% - 7.5px) / 100% 100% no-repeat,
    radial-gradient(circle at center, red 12.5px, $t 10px)
      calc(-70px + #{$left}) calc(50% - 5px) / 100% 100% no-repeat,
    radial-gradient(ellipse at left, $t 17px, green 17px, green 22px, $t 22px)
      calc(120px + #{$left}) calc(50% - 25px) / 100% 150% no-repeat,
    radial-gradient(ellipse at left, $t 17px, green 17px, green 22px, $t 22px)
      calc(100px + #{$left}) calc(50% - 35px) / 100% 225% no-repeat,
    radial-gradient(circle at bottom, green 20px, $t 20px)
      calc(-100px + #{$left}) -297px / 100% 100% no-repeat,

}

@function animate($left, $top, $multiplier) {
  @return 
    //cherry
    calc(-100px + #{$left}) calc(50% - 7.5px - (#{$top} * #{$multiplier})),
    calc(-70px + #{$left}) calc(50% - 5px - (#{$top} * #{$multiplier})),
    calc(120px + #{$left}) calc(50% - 25px - (#{$top} * #{$multiplier})),
    calc(100px + #{$left}) calc(50% - 35px - (#{$top} * #{$multiplier})),
    calc(-100px + #{$left}) calc(-297px - (#{$top} * #{$multiplier})),
    //star
    calc(50% - 190px + #{$left}) calc(50% - 180px - (#{$top} * #{$multiplier})),
    calc(50% + 10px + #{$left}) calc(50% - 180px - (#{$top} * #{$multiplier})),
    calc(50% + 10px + #{$left}) calc(50% - 180px - (#{$top} * #{$multiplier})),
    calc(50% - 190px + #{$left}) calc(50% - 180px - (#{$top} * #{$multiplier})),
    calc(50% - 190px + #{$left}) calc(50% - 20px - (#{$top} * #{$multiplier})),
    calc(50% + 10px + #{$left}) calc(50% - 20px - (#{$top} * #{$multiplier})),
    //seven
    calc(50% - 105px + #{$left}) calc(50% + 35px - (#{$top} * #{$multiplier})),
    calc(50% - 105px + #{$left}) calc(50% + 50px - (#{$top} * #{$multiplier})),
    //seven
    calc(50% - 105px + #{$left}) calc(50% - 215px - (#{$top} * #{$multiplier})),
    calc(50% - 105px + #{$left}) calc(50% - 200px - (#{$top} * #{$multiplier})),
    //star
    calc(50% - 190px + #{$left}) calc(50% + 70px - (#{$top} * #{$multiplier})),
    calc(50% + 10px + #{$left}) calc(50% + 70px - (#{$top} * #{$multiplier})),
    calc(50% + 10px + #{$left}) calc(50% + 70px - (#{$top} * #{$multiplier})),
    calc(50% - 190px + #{$left}) calc(50% + 70px - (#{$top} * #{$multiplier})),
    calc(50% - 190px + #{$left}) calc(50% + 227.5px - (#{$top} * #{$multiplier})),
    calc(50% + 10px + #{$left}) calc(50% + 227.5px - (#{$top} * #{$multiplier})),
    //cherry
    calc(-100px + #{$left}) calc(50% - 7.5px - (#{$top} * #{$multiplier}) + 250px),
    calc(-70px + #{$left}) calc(50% - 5px - (#{$top} * #{$multiplier}) + 250px),
    calc(120px + #{$left}) calc(50% - 25px - (#{$top} * #{$multiplier}) + 250px),
    calc(100px + #{$left}) calc(50% - 35px - (#{$top} * #{$multiplier}) + 250px),
    calc(-100px + #{$left}) calc(-297px - (#{$top} * #{$multiplier}) + 250px),
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  width: 100vw;
  background:linear-gradient(to right, #fff, #fff) 50% 50% / 400px 400px no-repeat, 
    linear-gradient(to top, darken($g, 30%) 20px, $t 20px) 50% calc(50% + 50px) / 500px 400px no-repeat, linear-gradient(to top, darken($g, 30%) 20px, darken($g, 15%) 20px) 50% calc(50% + 60px) / 450px 380px no-repeat, radial-gradient(circle at bottom right, darken($g, 15%) 25px, $t 25px) calc(50% - 215px) calc(50% - 145px) / 30px 30px no-repeat, radial-gradient(circle at bottom left, darken($g, 15%) 25px, $t 25px) calc(50% + 215px) calc(50% - 145px) / 30px 30px no-repeat, linear-gradient(to bottom, $t 50%, darken(red, 40%) 50%, darken(red, 10%)), radial-gradient(circle at center, $bl, darken($bl, 20%));
  &:after{
    content:'';
    position:absolute;
    width:100px;
    height:300px;
    left:calc(50% + 220px);
    top:calc(50% - 200px);
    background:linear-gradient(to bottom, darken($g, 15%), darken($g, 5%), darken($g, 15%)) 0% 100% / 30px 100px no-repeat,
      radial-gradient(circle at center, #222, #000 15px, #000 30px, $t 30px) -7.5px -100px / 100% 100% no-repeat,
      linear-gradient(to bottom, $t 10px, darken($g, 10%) 10px, darken($g, 10%)) 35px 25px / 15px 200px no-repeat,
      linear-gradient(to bottom, darken($g, 20%), darken($g, 10%), darken($g, 20%)) 30px calc(100% - 10px) / 25px 80px no-repeat;
    animation:pull 8s ease-in-out infinite;
    @keyframes pull{
      0%{
        background-size: 30px 100px, 100% 100%, 15px 200px, 25px 80px;
        background-position: 0% 100%, -7.5px -100px, 35px 25px, 30px calc(100% - 10px);
      }
      10%{
        background-size: 30px 100px, 100% 100%, 15px 100px, 25px 80px;
        background-position: 0% 100%, -7.5px -40px, 35px 125px, 30px calc(100% - 10px);
      }
      20%{
        animation-timing-function:cubic-bezier(0.175, 0.885, 0.32, 1.275);
        background-size: 30px 100px, 100% 100%, 15px 100px, 25px 80px;
        background-position: 0% 100%, -7.5px -40px, 35px 125px, 30px calc(100% - 10px);
      }
      25%{
        animation-timing-function:cubic-bezier(0.175, 0.885, 0.32, 1.275);
        background-size: 30px 100px, 100% 100%, 15px 200px, 25px 80px;
        background-position: 0% 100%, -7.5px -100px, 35px 25px, 30px calc(100% - 10px);
      }
    }
  }
  &:before {
    content: "GET • LUCKY";
    font-family:'Monoton';
    color:lighten(#ffcc00, 5%);
    text-shadow:0 0 10px #ffcc00, 0 0 15px red;
    text-align:center;
    font-size:50px;
    border-radius:50px 50px 0px 0px;
    box-shadow:inset 0 -20px 0 darken($g, 30%), inset 0 0 0 10px $g, 0 -10px 0  darken($g, 10%), 10px -15px 0 -5px darken($g, 10%), -10px -15px 0 -5px darken($g, 10%);
    line-height:2.15;
    position: absolute;
    width: 400px;
    height: 500px;
    background: 
      linear-gradient(to bottom, #666, #000) 100px 300px / 40px 5px no-repeat,
      linear-gradient(-45deg, $t 50%, darken(red, 10%) 50%, darken(red, 20%)) 25px calc(50% - 15px) / 15px 15px no-repeat,
      linear-gradient(-135deg, $t 50%, darken(red, 10%) 50%, darken(red, 20%)) 25px calc(50% - 30px) / 15px 15px no-repeat,
      linear-gradient(45deg, $t 50%, darken(red, 10%) 50%, darken(red, 20%)) 360px calc(50% - 15px) / 15px 15px no-repeat,
      linear-gradient(135deg, $t 50%, darken(red, 10%) 50%, darken(red, 20%)) 360px calc(50% - 30px) / 15px 15px no-repeat,
      linear-gradient(to right, darken($g, 20%) 200px, $t 200px) 50% 320px / 200px 5px no-repeat,
      linear-gradient(65deg, $g 45px, $t 45px) calc(50% - 87.5px) 325px / 175px 100px no-repeat,
      linear-gradient(-65deg, $g 45px, $t 45px) calc(50% + 87.5px) 325px / 175px 100px no-repeat,
      linear-gradient(to top, $g 75px, rgba(0,0,0,0.35) 75px, rgba(0,0,0,0.05) 150px, rgba(0,0,0,0.35) 150px, rgba(0,0,0,0.35) 155px, $t 155px) 50% 50% / 350px 500px no-repeat,
      linear-gradient(to bottom, darken($g, 20%), darken($g, 40%) 100px, $g 100px, $g 150px, $t 150px, $t 300px, $g 300px) center no-repeat,  
      linear-gradient(
        to right,
        $g 50px,
        $t 50px,
        $t 150px,
        $g 150px,
        $g 155px,
        $t 155px,
        $t 250px,
        $g 250px,
        $g 255px,
        $t 255px,
        $t 350px,
        $g 350px
      ) 50% 100px / 100% 500px no-repeat,
      linear-gradient(to bottom, darken($g, 10%) 100px, $g 100px, darken($g, 20%) 150px, $t 180px, $t 230px, darken($g, 20%) 300px) center, 
      cherry(-10px), cherry(90px), cherry(190px), cherry(-10px), cherry(90px), cherry(190px);

    animation: cherries 8s cubic-bezier(0.175, 0.885, 0.32, 1.275) infinite, blink 5s linear infinite;
    @keyframes blink{
      0%{
        color:lighten(#ffcc00, 5%);
        text-shadow:0 0 10px transparentize(#ffcc00, 0.5), 0 0 15px red;
      }
      1%{
        color:#ffcc00;
         text-shadow:0 0 5px transparentize(#ffcc00, 0.5), 0 0 10px transparentize(red, 0.5);
      }
      2%{
        color:lighten(#ffcc00, 5%);
        text-shadow:0 0 10px #ffcc00, 0 0 15px red;
      }
      3%{
        color:#ffcc00;
         text-shadow:0 0 5px transparentize(#ffcc00, 0.5), 0 0 10px transparentize(red, 0.5);
      }
      4%{
        color:lighten(#ffcc00, 5%);
        text-shadow:0 0 10px transparentize(#ffcc00, 0.5), 0 0 15px red;
      }
    }
   @keyframes cherries {
      0% {
        background-position: 
        $tophalf, 
        animate(-10px, 1px, 0),
        animate(90px, 1px, 0), 
        animate(190px, 1px, 0), 
        animate(-10px, 1px, 500), 
        animate(90px, 1px, 500), 
        animate(190px, 1px, 500);
      }
     12.5% {
        background-position: 
        $tophalf,
        animate(-10px, 1px, 0),
        animate(90px, 1px, 0), 
        animate(190px, 1px, 0), 
        animate(-10px, 1px, 500), 
        animate(90px, 1px, 500), 
        animate(190px, 1px, 500);
      }
      25% {
        animation-timing-function:linear;
        background-position: 
        $tophalf,
        animate(-10px, 1px, 100),
        animate(90px, 1px, 50), 
        animate(190px, 1px, 100), 
        animate(-10px, 1px, 600), 
        animate(90px, 1px, 550), 
        animate(190px, 1px, 600);
      }
      35% {
        animation-timing-function:linear;
        background-position: 
        $tophalf,
        animate(-10px, 1px, -500),
        animate(90px, 1px, -575), 
        animate(190px, 1px, -500), 
        animate(-10px, 1px, 0), 
        animate(90px, 1px, -75), 
        animate(190px, 1px, 0);
      }
      35.001% {
        animation-timing-function:linear;
        background-position: 
        $tophalf,
        animate(-10px, 1px, 0),
        animate(90px, 1px, -75), 
        animate(190px, 1px, 0), 
        animate(-10px, 1px, 500), 
        animate(90px, 1px, 425), 
        animate(190px, 1px, 500);
      }
      45% {
        animation-timing-function:linear;
        background-position: 
        $tophalf,
        animate(-10px, 1px, -500),
        animate(90px, 1px, -500), 
        animate(190px, 1px, -500), 
        animate(-10px, 1px, 0), 
        animate(90px, 1px, 0), 
        animate(190px, 1px, 0);
      }
      45.001% {
        animation-timing-function:linear;
        background-position: 
        $tophalf,
        animate(-10px, 1px, 0),
        animate(90px, 1px, 0), 
        animate(190px, 1px, 0), 
        animate(-10px, 1px, 500), 
        animate(90px, 1px, 500), 
        animate(190px, 1px, 500);
       }
      55% {
        animation-timing-function:linear;
        background-position: 
        $tophalf,
        animate(-10px, 1px, -500),
        animate(90px, 1px, -500), 
        animate(190px, 1px, -500), 
        animate(-10px, 1px, 0), 
        animate(90px, 1px, 0), 
        animate(190px, 1px, 0);
      }
     55.001% {
        animation-timing-function:cubic-bezier(0.175, 0.885, 0.32, 1.275);
        background-position: 
        $tophalf,
        animate(-10px, 1px, 0),
        animate(90px, 1px, 0), 
        animate(190px, 1px, 0), 
        animate(-10px, 1px, 500), 
        animate(90px, 1px, 500), 
        animate(190px, 1px, 500);
      }
     57% {
        animation-timing-function:cubic-bezier(0.175, 0.885, 0.32, 1.275);
        background-position: 
        $tophalf,
        animate(-10px, 1px, -10),
        animate(90px, 1px, -20), 
        animate(190px, 1px, -10), 
        animate(-10px, 1px, 490), 
        animate(90px, 1px, 480), 
        animate(190px, 1px, 490);
      }
     60% {
        animation-timing-function:cubic-bezier(0.175, 0.885, 0.32, 1.275);
        background-position: 
        $tophalf,
        animate(-10px, 1px, 0),
        animate(90px, 1px, 0), 
        animate(190px, 1px, 0), 
        animate(-10px, 1px, 500), 
        animate(90px, 1px, 500), 
        animate(190px, 1px, 500);
      }
     100% {
        animation-timing-function:cubic-bezier(0.175, 0.885, 0.32, 1.275);
        background-position: 
        $tophalf,
        animate(-10px, 1px, 0),
        animate(90px, 1px, 0), 
        animate(190px, 1px, 0), 
        animate(-10px, 1px, 500), 
        animate(90px, 1px, 500), 
        animate(190px, 1px, 500);
      }
    } 
  }
}

              
            
!

JS

              
                
              
            
!
999px

Console