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 CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

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.

            
              <h1>Daily CSS Images: Mondrian Clock</h1>
<div class="clock-container">
    <div class="clock-left"></div>
    <div class="clock-top"></div>
    <div class="clock-wrapper">
        <div class="minute-arrow"> </div>
        <div class="hour-arrow"></div>
                <div class="circle-sm"></div>
        <div class="seconds-arrow"></div>
    </div>
    </div>
            
          
!
            
              @import url('https://fonts.googleapis.com/css?family=Arima+Madurai');

*, *:before, *:after {
     box-sizing: border-box;
}
 body {
    background: #355161;
  }
h1 {
  text-align: center;
  color: white;
  font-family: 'Arima Madurai', cursive;
  
}
  .clock-container {
    position: relative;
    margin: 0 auto; 
    width: 225px;
    height: 300px;
    background: whitesmoke;
    box-shadow: 5px 5px 5px 2px #232222;
    transform: scale(0.8);
    }

        .clock-left {
            width: 75px;
            height: 225px;
            border: 4px solid #000;
            border-bottom: 0;
            border-left: 0;
            position: absolute;
            left: 0;
            bottom: 0;
        }

        .clock-left:before {
            content: "";
            position: absolute;
            left: 0;
            height: 37.5px;
            background: #d7c833;
            width: 100%;
            bottom: 0;
            border-top: 4px solid #000;
        }
        .clock-left:after {
            content: "";
            position: absolute;
            width: 100%;
            height: 4px;
            bottom: 69px;
            background: black;
        }
        .clock-top {
            position: absolute;
            top: 0;
            right: 0;
            width: 150px;
            height: 150px;
        }


        .clock-top:before {
            content: "";
            position: absolute;
            bottom: 0;
            left: 0;
            width: 80px;
            height: 75px;
            background: #2e3585;
            border: 4px solid #000;
            border-left: 0;
            border-bottom: 0;
        }

        .clock-top:after {
            content: "";
            position: absolute;
            left: 76px;
            top: 0;
            width: 4px;
            height: 75px;
            background: #000;
        }

        .clock-wrapper {
            position: absolute;
            right: 0;
            bottom: 0;
            width: 150px;
            height: 150px;
            border-top: 4px solid #000;
        }
        .clock-wrapper:before {
            content: "";
            position: absolute;
            width: 100%;
            height: 4px;
            background: #000;
            top: 50%;
        }

        .clock-wrapper:after {
            content: "";
            background: #e53534;
            position: absolute;
            width: 50%;
            height: 50%;
            left: 50%;
            border-left: 4px solid #000;
        }
        .seconds-arrow, .circle-sm, .minute-arrow, .hour-arrow {
                        z-index: 2;
        }
        .seconds-arrow {
            background: black;
            height: 60%;
            width: 1.5%;
            position: absolute;
            transform-origin: 50% 67%;
            top: 10%;
            left: 49.25%;
        }
        .seconds-arrow:before {
            content: "";
            position: absolute;
            width: 100%;
            height: 3%;
            background: black;
            border-radius: 50%;
            bottom: 98%;
        }
        .circle-sm {
            background-image: linear-gradient(to right bottom, #ba9d6f 50%, #745c47 20%);
            height: 10%;
            width: 10%;
            position: absolute;
            top: 45%;
            left: 45%;
            border-radius: 50%;
            border: 4px solid black;
        }
        .minute-arrow {
            background: black;
            height: 30%;
            position: absolute;
            top: 20%;
            left: 48.5%;
            transform-origin: 50% 100%;
            transition: transform 3s;
            width: 3%;
        }

        .minute-arrow:before {
            content: "";
            position: absolute;
            bottom: 96%;
            width: 100%;
            height: 8%;
            background: black;
            border-radius: 50%;
        }
        .hour-arrow {
            background: black;
            height: 20%;
            position: absolute;
            top: 30%;
            left: 47%;
            transform-origin: 50% 100%;
            transition: transform 3s;
            width: 6%;
        }

        .hour-arrow:before {
            content: "";
            position: absolute;
            bottom: 90%;
            background: black;
            width: 100%;
            height: 25%;
            left: 0;
            border-radius: 50%;
        }
        .seconds-arrow {
            animation: 60s clock-arrow-spin steps(60, end) infinite;
        }
        .minute-arrow {
            animation: 3600s clock-arrow-spin steps(60, end) infinite;
        }
        .hour-arrow {
            animation: 43200s clock-arrow-spin steps(60, end) infinite;
        }


        /*   -------------------   CSS ANIMATIONS   -------------------   */
        
        @-webkit-keyframes clock-arrow-spin {
            100% {
                transform: rotate(360deg);
            }
        }

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

Console