JSFiddle - React, Tailwind, and code Playground

by Sam Westwood

HTML

<div class="clock">
  <div class="top"></div>
  <div class="right"></div>
  <div class="bottom"></div>
  <div class="left"></div>
  <div class="center"></div>
  <div class="second"></div>
  <div class="hour"></div>
  <div class="minute"></div>
 
</div>

CSS

* {
  margin: 0;
  padding: 0;
  border: 0;
}

.clock {
  position: relative;
  height: 200px;
  width: 200px;
  background: white;
  box-sizing: border-box;
  border-radius: 100%;
  border: 10px solid #67D2C8;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  margin: auto;
}
.clock .top {
  position: absolute;
  width: 3px;
  height: 8px;
  background: #262626;
  left: 0;
  right: 0;
  margin: 0 auto;
}
.clock .right {
  position: absolute;
  width: 8px;
  height: 3px;
  background: #262626;
  top: 0;
  bottom: 0;
  right: 0;
  margin: auto 0;
}
.clock .bottom {
  position: absolute;
  width: 3px;
  height: 8px;
  background: #262626;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0 auto;
}
.clock .left {
  position: absolute;
  width: 8px;
  height: 3px;
  background: #262626;
  top: 0;
  bottom: 0;
  left: 0;
  margin: auto 0;
}
.clock .center {
  height: 6px;
  width: 6px;
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  margin: auto;
  background: #262626;
  border-radius: 100%;
}
.clock .hour {
  width: 3px;
  height: 100%;
  position: absolute;
  left: 0;
  right: 0;
  margin: 0 auto;
  animation: time 90s infinite linear;
}
.clock .hour:before {
  position: absolute;
  content: "";
  background: #262626;
  height: 40px;
  width: 1px;
  top: 50px;
}
.clock .minute {
  width: 1px;
  height: 100%;
  position: absolute;
  left: 0;
  right: 0;
  margin: 0 auto;
  animation: time 20s infinite linear;
}
.clock .minute:before {
  position: absolute;
  content: "";
  background: #262626;
    height: 60px;
  width: 3px;
  top: 30px;
  
}
.clock .second {
  width: 2px;
  height: 100%;
  position: absolute;
  left: 0;
  right: 0;
  margin: 0 auto;
  animation: time 2s infinite linear;
}
.clock .second:before {
  position: absolute;
  content: "";
  background: #fd1111;
  height: 45px;
  width: 2px;
  top: 45px;
}

@keyframes time {
  to {
    transform: rotate(360deg);
  }
}