css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

Pen Settings

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

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              <!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
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................

Console