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 is required to process package imports. If you need a different preprocessor remove all packages first.

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

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

              
                    <div class="body-container">
        <div class="veil-container">
            <div class="face">
                <!-- Start: eye -->
                <div class="eye left-eye">
                    <div class="eye-core">
                        <div class="eye_core_black">
                            <div class="eye_core_white_big"></div>
                            <div class="eye_core_white_small"></div>
                        </div>
                        <!-- absolute position= positioned relative to its nearest positioned ancstor-->
                    </div>
                </div>
                <div class="eye right-eye">
                    <div class="eye-core">
                        <div class="eye_core_black">
                            <div class="eye_core_white_big"></div>
                            <div class="eye_core_white_small"></div>
                        </div>
                    </div>
                </div>
                <!-- End: eye 
            =====================================================-->
                <!-- Start: cheek-->
                <div class="cheek left_cheek"></div>
                <div class="cheek right_cheek"></div>
                <!-- Start: mouth-->
                <div class="mouth"></div>
            </div>
        </div>
        <!--End: veil container-->
        <div class="body"></div>
    </div>
              
            
!

CSS

              
                      $veil-color:#ebd;
      $subveil-color: #90b ;
      $cloth-color:#F44336;
     /* Start : body */

     .body {
            width: 100%;
            height: 120px;
            border: 1px solid #ef8078;
            border-radius: 120px 140px 0px 0px;
            background-color: $cloth-color;
            border-left:8px solid #e64c41;
            border-right:3px solid #ef8078;
        }
      .body-container {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%); 
        }

       .veil-container {
            background-color: $subveil-color;
            border-top: 46px solid $veil-color ;
            border-left: 26px solid $veil-color ;
            border-right: 26px solid $veil-color ;
            border-radius: 48%;
          animation:move_head 4s infinite;
        }

        .face {
            width: 220px;
            height: 220px;
            border: 1px solid;
            border-radius: 50%;
            background-color: #fbebdc;
            border-top: 10px solid #fdc;
            border-bottom: 1px solid #fdc;
            border-left: 2px solid #fdc;
            border-right: 2px solid #fdc;
            position: relative;
        }

        .eye {
            width: 70px;
            height: 60px;
            background-color: #fff;
            border-radius: 80%;
            border-top: 1px solid #851;
            position: absolute;
            top: 30%;
            overflow: hidden;
            animation: blink_eye 2.5s infinite;
        }


        .left-eye {
            left: 60%;
        }

        .right-eye {
            right: 60%;
        }

        .eye-core {
            width: 50px;
            height: 50px;
            background-color: #851;
            border: 1px solid transparent;
            border-radius: 50%;
            position: absolute;
            top: 5px;
            left: 10px;
            overflow: hidden;
            animation: moved_eye 3s  infinite;
        }

        .eye_core_black {
            width: 30px;
            height: 30px;
            background-color: #000;
            border: 1px solid transparent;
            border-radius: 50%;
            position: absolute;
            top: 10px;
            left: 10px;
        }

        .eye_core_white_big,
        .eye_core_white_small {
            background-color: #fff;
            border: 1px solid transparent;
            border-radius: 50%;
            position: absolute;
            left: -5px;
            opacity: .9;
        }

        .eye_core_white_big {
            width: 13px;
            height: 13px;
            top: -6px;
        }

        .eye_core_white_small {
            width: 5px;
            height: 5px;
            top: 10px;
        }
        /*end*/
        /* Start:cheek*/

        .cheek {
            width: 50px;
            height: 50px;
            background-color: #e83a3a;
            border-radius: 50%;
            position: absolute;
            top: 60%;
            opacity: .1;
            background: radial-gradient(#e83a3a 30%, #fbebdc 70%, #fbebdc 35%);
            animation: cheek 6s infinite;
        }

        .left_cheek {
            left: 70%;
        }

        .right_cheek {
            right: 70%;
        }
        /*End:cheek*/
        /* Start: mouth
/*====================================*/

        .mouth {
            width: 50px;
            height: 40px;
            background-color: #e83a3a;
            border: 1px solid transparent;
            border-radius: 0px 0px 27px 25px;
            position: absolute;
            top: 70%;
            left: 40%;
        }

        .mouth:before {
            content: "";
            width: 60px;
            height: 40px;
            background-color: #fbebdc;
            border: 1px solid transparent;
            border-radius: 60%;
            position: absolute;
            top: -15px;
            left: -4px;
            animation: smile_mouth_before 6s infinite;
        }
        /* End */
        /* Start: animation       
/*====================================*/

        @keyframes blink_eye {
            90% {
                transform: none;
                animation-timing-function: ease-in;
            }
            93% {
                transform: translateY(30px) scaleY(0);
            }
            100% {
                animation-timing-function: ease-out;
            }
        }

        @keyframes moved_eye {
            50% {
                transform: translate(4px, 4px);
              opacity:.9;
            }
            100% {
                transform: translate(-4px, -4px);
            }
        }

        @keyframes smile_mouth_before {
            25% {
                border-radius: 40%;
            }
            50% {
                border-radius: 20%;
            }
            100% {
                border-radius: 60%;
              
            }
        }

        @keyframes cheek {
            25% {
                opacity: .05;
            }
            50% {
                opacity: .1;
            }
            100% {
                opacity: .15;
            }
        }
@keyframes move_head{
  50%{transform:translate(2.5px, 2.5px);}
  100%{transform:translate(-1.2px, -2px);}
}
        /*End animation */
   
              
            
!

JS

              
                
              
            
!
999px

Console