cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - Activehtmlicon-personicon-teamoctocatpop-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.

            
              <!doctype html>
<html>
<head>
    <title>Drew Rios's Watches</title>
    <link rel="stylesheet" href="/style.css">
</head>
<body>
  <div id="clock">
      <div id="rim">
          <div id="face">
              <div class="shadow"></div>
              <!-- Hands -->
              <div class="hhh holder">
                  <div class="hh hand">
                      <div class="h"></div>
                  </div>
              </div>
              <div class="mmm holder">
                  <div class="mm hand">
                      <div class="m"></div>
                  </div>
              </div>
              <div class="ss hand">
                  <div class="s"></div>
                  <!-- <div class="cap"></div> -->
              </div>
  
              <div class="cap holder">
              </div>   
  
  
              <!-- Hand Shadows -->
              <div id="sh">
                  <div class="hhh holder">
                      <div class="hh hand">
                          <div class="h"></div>
                      </div>
                  </div>
                  <div class="mmm holder">
                      <div class="mm hand">
                          <div class="m"></div>
                      </div>
                  </div>
                  <div class="ss hand">
                      <div class="s"></div>
                  </div>
              </div>
  
              <!-- Ticks -->
              <div class="ii shadows">
                  <div><b></b></div>
                  <div><b></b></div>
                  <div><b></b></div>
                  <div><b></b></div>
                  <div><b></b></div>
                  <div><b></b></div>
                  <div><b></b></div>
                  <div><b></b></div>
                  <div><b></b></div>
                  <div><b></b></div>
                  <div><b></b></div>
                  <div><b></b></div>
              </div>
              <div class="ii">
                  <div><b></b></div>
                  <div><b></b></div>
                  <div><b></b></div>
                  <div><b></b></div>
                  <div><b></b></div>
                  <div><b></b></div>
                  <div><b></b></div>
                  <div><b></b></div>
                  <div><b></b></div>
                  <div><b></b></div>
                  <div><b></b></div>
                  <div><b></b></div>
              </div>
          </div>
      </div>
  </div>
</body>
</html>
            
          
!
            
              /* ==========================================================================
   Clock Movement.
   ========================================================================== */
#clock .hhh {
  -webkit-transform: rotate(-55deg);
  -moz-transform: rotate(-55deg);
  -o-transform: rotate(-55deg);
  -ms-transform: rotate(-55deg);
  transform: rotate(-55deg);
}
#clock .hhh .hh {
  -webkit-animation: full_rotation 43200s normal infinite linear;
  -moz-animation: full_rotation 43200s normal infinite linear;
  -o-animation: full_rotation 43200s normal infinite linear;
  -ms-animation: full_rotation 43200s normal infinite linear;
  animation: full_rotation 43200s normal infinite linear;
}
#clock .mmm {
  -webkit-transform: rotate(60deg);
  -moz-transform: rotate(60deg);
  -o-transform: rotate(60deg);
  -ms-transform: rotate(60deg);
  transform: rotate(60deg);
}
#clock .mmm .mm {
  -webkit-animation: full_rotation 3600s normal infinite linear;
  -moz-animation: full_rotation 3600s normal infinite linear;
  -o-animation: full_rotation 3600s normal infinite linear;
  -ms-animation: full_rotation 3600s normal infinite linear;
  animation: full_rotation 3600s normal infinite linear;
}
#clock .ss {
  -webkit-animation: tick .166666667s normal infinite steps(1,end);
  -moz-animation: tick .166666667s normal infinite steps(1,end);
  -o-animation: tick .166666667s normal infinite steps(1,end);
  -ms-animation: tick .166666667s normal infinite steps(1,end);
  animation: tick .166666667s normal infinite steps(1,end);
  -webkit-animation: one_second 60s normal infinite steps(360,end);
  -moz-animation: one_second 60s normal infinite steps(360,end);
  -o-animation: one_second 60s normal infinite steps(360,end);
  -ms-animation: one_second 60s normal infinite steps(360,end);
  animation: one_second 60s normal infinite steps(360,end);
}
@-webkit-keyframes tick {
  0% {
    -webkit-transform: rotate(0deg);
    -moz-transform: rotate(0deg);
    -o-transform: rotate(0deg);
    -ms-transform: rotate(0deg);
    transform: rotate(0deg);
  }
  12% {
    -webkit-transform: rotate(1deg);
    -moz-transform: rotate(1deg);
    -o-transform: rotate(1deg);
    -ms-transform: rotate(1deg);
    transform: rotate(1deg);
  }
  100% {
    -webkit-transform: rotate(1deg);
    -moz-transform: rotate(1deg);
    -o-transform: rotate(1deg);
    -ms-transform: rotate(1deg);
    transform: rotate(1deg);
  }
}
@-webkit-keyframes one_second {
  0% {
    -webkit-transform: translate(0, 0) rotate(0deg) translate(0, 0);
    -moz-transform: translate(0, 0) rotate(0deg) translate(0, 0);
    -o-transform: translate(0, 0) rotate(0deg) translate(0, 0);
    -ms-transform: translate(0, 0) rotate(0deg) translate(0, 0);
    transform: translate(0, 0) rotate(0deg) translate(0, 0);
  }
  100% {
    -webkit-transform: translate(0, 0) rotate(360deg) translate(0, 0);
    -moz-transform: translate(0, 0) rotate(360deg) translate(0, 0);
    -o-transform: translate(0, 0) rotate(360deg) translate(0, 0);
    -ms-transform: translate(0, 0) rotate(360deg) translate(0, 0);
    transform: translate(0, 0) rotate(360deg) translate(0, 0);
  }
}
@-webkit-keyframes full_rotation {
  0% {
    -webkit-transform: translate(0, 0%) rotate(0deg) translate(0,-0%);
    -moz-transform: translate(0, 0%) rotate(0deg) translate(0,-0%);
    -o-transform: translate(0, 0%) rotate(0deg) translate(0,-0%);
    -ms-transform: translate(0, 0%) rotate(0deg) translate(0,-0%);
    transform: translate(0, 0%) rotate(0deg) translate(0,-0%);
  }
  50% {
    -webkit-transform: translate(0, 0%) rotate(180deg) translate(0,-0%);
    -moz-transform: translate(0, 0%) rotate(180deg) translate(0,-0%);
    -o-transform: translate(0, 0%) rotate(180deg) translate(0,-0%);
    -ms-transform: translate(0, 0%) rotate(180deg) translate(0,-0%);
    transform: translate(0, 0%) rotate(180deg) translate(0,-0%);
  }
  100% {
    -webkit-transform: translate(0, 0%) rotate(360deg) translate(0,-0%);
    -moz-transform: translate(0, 0%) rotate(360deg) translate(0,-0%);
    -o-transform: translate(0, 0%) rotate(360deg) translate(0,-0%);
    -ms-transform: translate(0, 0%) rotate(360deg) translate(0,-0%);
    transform: translate(0, 0%) rotate(360deg) translate(0,-0%);
  }
}
/* ==========================================================================
   General Styles.
   ========================================================================== */
* {
  position: relative;
}
html,
body {
  height: 100%;
  width: 100%;
}
body {
  font-size: 10px;
  background-color: #fafafa;
  background-image: -moz-radial-gradient(25% bottom, circle cover, #FFF 10%, #ddd 60%);
  background-image: -webkit-radial-gradient(25% bottom, circle cover, #FFF 10%, #ddd 60%);
  background-image: -o-radial-gradient(25% bottom, circle cover, #FFF 10%, #ddd 60%);
  background-image: radial-gradient(25% bottom, circle cover, #FFF 10%, #ddd 60%);
}
h1 {
  font-family: "TradeGothicLTStd-Cn18", sans-serif;
  font-weight: normal;
  margin: 0;
  font-size: 10em;
  color: #333;
}
/* ==========================================================================
   Clock Styles.
   ========================================================================== */
#clock {
  width: 500px;
  height: 500px;
  left: 50%;
  top: 50%;
  margin: -250px 0 0 -250px;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  -webkit-transition: none;
  -moz-transition: none;
  -o-transition: none;
  -ms-transition: none;
  transition: none;
  font-size: 3em;
}
#rim {
  position: absolute;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  padding: 3%;
  background: #fdfdfd;
  -webkit-border-radius: 50%;
  -webkit-background-clip: padding-box;
  -moz-border-radius: 50%;
  -moz-background-clip: padding;
  border-radius: 50%;
  background-clip: padding-box;
  -webkit-box-shadow: 0 0 4px rgba(0, 0, 0, 0.10909090909090909);
  -moz-box-shadow: 0 0 4px rgba(0, 0, 0, 0.10909090909090909);
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.10909090909090909);
  color: 0 0 4px rgba(0, 0, 0, 0.10909090909090909);
}
#face {
  position: absolute;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  width: 94%;
  height: 94%;
  background: #fff;
  -webkit-border-radius: 50%;
  -webkit-background-clip: padding-box;
  -moz-border-radius: 50%;
  -moz-background-clip: padding;
  border-radius: 50%;
  background-clip: padding-box;
  -webkit-box-shadow: inset 0 0 33px rgba(0, 0, 0, 0.2727272727272727), inset 0 0 99px rgba(0, 0, 0, 0.18181818181818182), 0 0 3px rgba(0, 0, 0, 0.18181818181818182);
  -moz-box-shadow: inset 0 0 33px rgba(0, 0, 0, 0.2727272727272727), inset 0 0 99px rgba(0, 0, 0, 0.18181818181818182), 0 0 3px rgba(0, 0, 0, 0.18181818181818182);
  box-shadow: inset 0 0 33px rgba(0, 0, 0, 0.2727272727272727), inset 0 0 99px rgba(0, 0, 0, 0.18181818181818182), 0 0 3px rgba(0, 0, 0, 0.18181818181818182);
  color: inset 0 0 33px rgba(0, 0, 0, 0.2727272727272727) inset 0 0 99px rgba(0, 0, 0, 0.18181818181818182) 0 0 3px rgba(0, 0, 0, 0.18181818181818182);
}
#face .shadow {
  z-index: 10;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  -webkit-border-radius: 50%;
  -webkit-background-clip: padding-box;
  -moz-border-radius: 50%;
  -moz-background-clip: padding;
  border-radius: 50%;
  background-clip: padding-box;
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-transform: rotate(-45deg);
  -moz-transform: rotate(-45deg);
  -o-transform: rotate(-45deg);
  -ms-transform: rotate(-45deg);
  transform: rotate(-45deg);
  border-left: 1em solid rgba(0, 0, 0, 0.18181818181818182);
  -webkit-box-shadow: inset 3px 0 6px rgba(0, 0, 0, 0.18181818181818182);
  -moz-box-shadow: inset 3px 0 6px rgba(0, 0, 0, 0.18181818181818182);
  box-shadow: inset 3px 0 6px rgba(0, 0, 0, 0.18181818181818182);
  color: inset 3px 0 6px rgba(0, 0, 0, 0.18181818181818182);
}
.ii {
  position: absolute;
  width: 100%;
  height: 100%;
  z-index: 2;
}
.ii div {
  position: absolute;
  width: 100%;
  height: 100%;
  padding: 2%;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
}
.ii div b {
  position: absolute;
  display: block;
  left: 50%;
  width: 0.16em;
  height: 0.8em;
  margin-left: -0.08em;
  background: #f9f9f9;
  -webkit-box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.18181818181818182), 0 0 3px rgba(0, 0, 0, 0.2727272727272727), 0 0 20px rgba(0, 0, 0, 0.2727272727272727);
  -moz-box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.18181818181818182), 0 0 3px rgba(0, 0, 0, 0.2727272727272727), 0 0 20px rgba(0, 0, 0, 0.2727272727272727);
  box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.18181818181818182), 0 0 3px rgba(0, 0, 0, 0.2727272727272727), 0 0 20px rgba(0, 0, 0, 0.2727272727272727);
  color: inset 0 0 2px rgba(0, 0, 0, 0.18181818181818182) 0 0 3px rgba(0, 0, 0, 0.2727272727272727) 0 0 20px rgba(0, 0, 0, 0.2727272727272727);
}
.ii div:nth-child(1) {
  -webkit-transform: rotate(0deg);
  -moz-transform: rotate(0deg);
  -o-transform: rotate(0deg);
  -ms-transform: rotate(0deg);
  transform: rotate(0deg);
}
.ii div:nth-child(2) {
  -webkit-transform: rotate(30deg);
  -moz-transform: rotate(30deg);
  -o-transform: rotate(30deg);
  -ms-transform: rotate(30deg);
  transform: rotate(30deg);
}
.ii div:nth-child(3) {
  -webkit-transform: rotate(60deg);
  -moz-transform: rotate(60deg);
  -o-transform: rotate(60deg);
  -ms-transform: rotate(60deg);
  transform: rotate(60deg);
}
.ii div:nth-child(4) {
  -webkit-transform: rotate(90deg);
  -moz-transform: rotate(90deg);
  -o-transform: rotate(90deg);
  -ms-transform: rotate(90deg);
  transform: rotate(90deg);
}
.ii div:nth-child(5) {
  -webkit-transform: rotate(120deg);
  -moz-transform: rotate(120deg);
  -o-transform: rotate(120deg);
  -ms-transform: rotate(120deg);
  transform: rotate(120deg);
}
.ii div:nth-child(6) {
  -webkit-transform: rotate(150deg);
  -moz-transform: rotate(150deg);
  -o-transform: rotate(150deg);
  -ms-transform: rotate(150deg);
  transform: rotate(150deg);
}
.ii div:nth-child(7) {
  -webkit-transform: rotate(180deg);
  -moz-transform: rotate(180deg);
  -o-transform: rotate(180deg);
  -ms-transform: rotate(180deg);
  transform: rotate(180deg);
}
.ii div:nth-child(8) {
  -webkit-transform: rotate(210deg);
  -moz-transform: rotate(210deg);
  -o-transform: rotate(210deg);
  -ms-transform: rotate(210deg);
  transform: rotate(210deg);
}
.ii div:nth-child(9) {
  -webkit-transform: rotate(240deg);
  -moz-transform: rotate(240deg);
  -o-transform: rotate(240deg);
  -ms-transform: rotate(240deg);
  transform: rotate(240deg);
}
.ii div:nth-child(10) {
  -webkit-transform: rotate(270deg);
  -moz-transform: rotate(270deg);
  -o-transform: rotate(270deg);
  -ms-transform: rotate(270deg);
  transform: rotate(270deg);
}
.ii div:nth-child(11) {
  -webkit-transform: rotate(300deg);
  -moz-transform: rotate(300deg);
  -o-transform: rotate(300deg);
  -ms-transform: rotate(300deg);
  transform: rotate(300deg);
}
.ii div:nth-child(12) {
  -webkit-transform: rotate(330deg);
  -moz-transform: rotate(330deg);
  -o-transform: rotate(330deg);
  -ms-transform: rotate(330deg);
  transform: rotate(330deg);
}
.ii div:nth-child(3n+1) b {
  width: 0.3em;
  height: 1.2em;
  margin-left: -0.15em;
}
.ii.shadows {
  z-index: 1;
  -webkit-transform-origin: 20% 40%;
  -moz-transform-origin: 20% 40%;
  -o-transform-origin: 20% 40%;
  -ms-transform-origin: 20% 40%;
  transform-origin: 20% 40%;
}
.ii.shadows div b {
  -webkit-border-radius: 2px;
  -webkit-background-clip: padding-box;
  -moz-border-radius: 2px;
  -moz-background-clip: padding;
  border-radius: 2px;
  background-clip: padding-box;
  -webkit-box-shadow: 0 0 3px rgba(0, 0, 0, 0.3);
  -moz-box-shadow: 0 0 3px rgba(0, 0, 0, 0.3);
  box-shadow: 0 0 3px rgba(0, 0, 0, 0.3);
  color: 0 0 3px rgba(0, 0, 0, 0.3);
  background-color: rgba(0, 0, 0, 0.3);
}
#face > .hand,
#face > .holder {
  z-index: 10;
}
.holder {
  position: absolute;
  width: 100%;
  height: 100%;
}
.holder.cap {
  position: absolute;
  top: 50%;
  left: 50%;
  height: 10%;
  width: 10%;
  margin: -5% 0 0 -5%;
  -webkit-border-radius: 50%;
  -webkit-background-clip: padding-box;
  -moz-border-radius: 50%;
  -moz-background-clip: padding;
  border-radius: 50%;
  background-clip: padding-box;
  background: #f9f9f9;
  -webkit-box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.18181818181818182), 0 0 3px rgba(0, 0, 0, 0.2727272727272727), 0 0 20px rgba(0, 0, 0, 0.2727272727272727);
  -moz-box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.18181818181818182), 0 0 3px rgba(0, 0, 0, 0.2727272727272727), 0 0 20px rgba(0, 0, 0, 0.2727272727272727);
  box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.18181818181818182), 0 0 3px rgba(0, 0, 0, 0.2727272727272727), 0 0 20px rgba(0, 0, 0, 0.2727272727272727);
  color: inset 0 0 2px rgba(0, 0, 0, 0.18181818181818182) 0 0 3px rgba(0, 0, 0, 0.2727272727272727) 0 0 20px rgba(0, 0, 0, 0.2727272727272727);
}
.hand {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: 2;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  padding: 5%;
}
.hand div {
  position: relative;
  left: 50%;
  top: 5%;
  background: #f9f9f9;
  -webkit-box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.18181818181818182), 0 0 3px rgba(0, 0, 0, 0.2727272727272727), 0 0 20px rgba(0, 0, 0, 0.2727272727272727);
  -moz-box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.18181818181818182), 0 0 3px rgba(0, 0, 0, 0.2727272727272727), 0 0 20px rgba(0, 0, 0, 0.2727272727272727);
  box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.18181818181818182), 0 0 3px rgba(0, 0, 0, 0.2727272727272727), 0 0 20px rgba(0, 0, 0, 0.2727272727272727);
  color: inset 0 0 2px rgba(0, 0, 0, 0.18181818181818182) 0 0 3px rgba(0, 0, 0, 0.2727272727272727) 0 0 20px rgba(0, 0, 0, 0.2727272727272727);
}
.hand div.cap {
  width: 6%;
  height: 6%;
  background: #7171ff;
  margin: 0;
  top: 3%;
  left: 50%;
  -webkit-border-radius: 50%;
  -webkit-background-clip: padding-box;
  -moz-border-radius: 50%;
  -moz-background-clip: padding;
  border-radius: 50%;
  background-clip: padding-box;
  margin-left: -3%;
  -webkit-box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.18181818181818182);
  -moz-box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.18181818181818182);
  box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.18181818181818182);
  color: inset 0 0 2px rgba(0, 0, 0, 0.18181818181818182);
}
.hand div.s {
  width: 2px;
  height: 60%;
  background: #7171ff;
  margin-left: -1px;
}
.hand div.m {
  width: 6px;
  height: 40%;
  margin-left: -3px;
  margin-top: 8%;
}
.hand div.h {
  width: 12px;
  height: 30%;
  margin-top: 14%;
  outline: 1px solid transparent;
  margin-left: -7px;
}
#sh {
  position: absolute;
  width: 100%;
  height: 100%;
  top: -0.1em;
  left: 0.1em;
}
#sh .hand div {
  background: rgba(0, 0, 0, 0.18181818181818182);
  -webkit-box-shadow: 0 0 6px rgba(0, 0, 0, 0.18181818181818182);
  -moz-box-shadow: 0 0 6px rgba(0, 0, 0, 0.18181818181818182);
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.18181818181818182);
  color: 0 0 6px rgba(0, 0, 0, 0.18181818181818182);
}

            
          
!
            
              var CLOCK = {
    setStartPoints: function () {
        this.date  = new Date();

        var $clock = $("#clock"),
            theminute = this.date.getMinutes(),
            mPos   = theminute * 6,
            hPos   = this.date.getHours() * 30 + (theminute / 60 * 30),
            sPos   = this.date.getSeconds() * 6;

        $clock.find(".hhh").attr("style", this._formatCssOutput(hPos));
        $clock.find(".mmm").attr("style", this._formatCssOutput(mPos));
        $clock.find(".sss").attr("style", this._formatCssOutput(sPos));
    },
    _formatCssOutput: function (pos) {
        return "-webkit-transform: rotate(" + pos + "deg);"+
                  "-moz-transform: rotate(" + pos + "deg);"+
                    "-o-transform: rotate(" + pos + "deg);"+
                   "-ms-transform: rotate(" + pos + "deg);"+
                       "transform: rotate(" + pos + "deg);";
    }
};

$(function() {
    CLOCK.setStartPoints();
});
            
          
!
999px
Close

Asset uploading is a PRO feature.

As a PRO member, you can drag-and-drop upload files here to use as resources. Images, Libraries, JSON data... anything you want. You can even edit them anytime, like any other code on CodePen.

Go PRO

Loading ..................

Console