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

              
                <body style="background-color:#444;">
 <div class="container">
<div class="gauge">
  <div class="outer-edge"></div>
  <div class="inner-edge"></div>
  <div class="center"></div>
  <div class="shine"></div>
  <div class="tick-marks"></div>

  <div class="needle-assembly" id="first-gauge">
    <div class="needle-holder">
    <div class="needle-cap"></div>
    <div class="needle"></div> 
    </div>
  </div>
</div>

<div class="gauge" style="height:140px; width:140px; margin-top:-30px;">
  <div class="outer-edge"></div>
  <div class="inner-edge"></div>
  <div class="center"></div>
  <div class="shine"></div>
  <div class="tick-marks"></div>

  <div class="needle-assembly" id="second-gauge">
    <div class="needle-holder">
    <div class="needle-cap"></div>
    <div class="needle"></div> 
    </div>
  </div>
</div>

<div class="gauge">
  <div class="outer-edge"></div>
  <div class="inner-edge"></div>
  <div class="center"></div>
  <div class="shine"></div>
  <div class="tick-marks"></div>

  <div class="needle-assembly" id="third-gauge">
    <div class="needle-holder">
    <div class="needle-cap"></div>
    <div class="needle"></div> 
    </div>
  </div>
</div>
  </div>
</body>
              
            
!

CSS

              
                .gauge {
  position:relative;
  width:120px;
  height:120px;
  margin:10px;
  display:inline-block;
}
.outer-edge{
  background: #959595; /* Old browsers */
background: -moz-linear-gradient(-45deg,  #959595 0%, #828282 8%, #ffffff 16%, #5b5b5b 22%, #c4c4c4 55%, #5e5e5e 62%, #5e5e5e 80%, #f2f2f2 85%, #5e5e5e 88%, #828282 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, right bottom, color-stop(0%,#959595), color-stop(8%,#828282), color-stop(16%,#ffffff), color-stop(22%,#5b5b5b), color-stop(55%,#c4c4c4), color-stop(62%,#5e5e5e), color-stop(80%,#5e5e5e), color-stop(85%,#f2f2f2), color-stop(88%,#5e5e5e), color-stop(100%,#828282)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(-45deg,  #959595 0%,#828282 8%,#ffffff 16%,#5b5b5b 22%,#c4c4c4 55%,#5e5e5e 62%,#5e5e5e 80%,#f2f2f2 85%,#5e5e5e 88%,#828282 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(-45deg,  #959595 0%,#828282 8%,#ffffff 16%,#5b5b5b 22%,#c4c4c4 55%,#5e5e5e 62%,#5e5e5e 80%,#f2f2f2 85%,#5e5e5e 88%,#828282 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(-45deg,  #959595 0%,#828282 8%,#ffffff 16%,#5b5b5b 22%,#c4c4c4 55%,#5e5e5e 62%,#5e5e5e 80%,#f2f2f2 85%,#5e5e5e 88%,#828282 100%); /* IE10+ */
background: linear-gradient(135deg,  #959595 0%,#828282 8%,#ffffff 16%,#5b5b5b 22%,#c4c4c4 55%,#5e5e5e 62%,#5e5e5e 80%,#f2f2f2 85%,#5e5e5e 88%,#828282 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#959595', endColorstr='#828282',GradientType=1 ); /* IE6-9 fallback on horizontal gradient */
  position:absolute;
  top: 0;
  left:0;
  height:100%;
  width:100%;
  -webkit-border-radius:50%;
  -webkit-box-shadow: 0 0 4px #000;
}
.inner-edge {
  background: #959595; /* Old browsers */
background: -moz-linear-gradient(45deg,  #959595 0%, #828282 8%, #ffffff 16%, #5b5b5b 22%, #c4c4c4 55%, #5e5e5e 62%, #5e5e5e 80%, #f2f2f2 85%, #5e5e5e 88%, #828282 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left bottom, right top, color-stop(0%,#959595), color-stop(8%,#828282), color-stop(16%,#ffffff), color-stop(22%,#5b5b5b), color-stop(55%,#c4c4c4), color-stop(62%,#5e5e5e), color-stop(80%,#5e5e5e), color-stop(85%,#f2f2f2), color-stop(88%,#5e5e5e), color-stop(100%,#828282)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(45deg,  #959595 0%,#828282 8%,#ffffff 16%,#5b5b5b 22%,#c4c4c4 55%,#5e5e5e 62%,#5e5e5e 80%,#f2f2f2 85%,#5e5e5e 88%,#828282 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(45deg,  #959595 0%,#828282 8%,#ffffff 16%,#5b5b5b 22%,#c4c4c4 55%,#5e5e5e 62%,#5e5e5e 80%,#f2f2f2 85%,#5e5e5e 88%,#828282 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(45deg,  #959595 0%,#828282 8%,#ffffff 16%,#5b5b5b 22%,#c4c4c4 55%,#5e5e5e 62%,#5e5e5e 80%,#f2f2f2 85%,#5e5e5e 88%,#828282 100%); /* IE10+ */
background: linear-gradient(45deg,  #959595 0%,#828282 8%,#ffffff 16%,#5b5b5b 22%,#c4c4c4 55%,#5e5e5e 62%,#5e5e5e 80%,#f2f2f2 85%,#5e5e5e 88%,#828282 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#959595', endColorstr='#828282',GradientType=1 ); /* IE6-9 fallback on horizontal gradient */
  position:absolute;
  top: 4%;
  left:4%;
  height:92%;
  width:92%;
  -webkit-border-radius:50%;
}

.center {
background: #2b20a3; /* Old browsers */
background: -moz-linear-gradient(top,  #2b20a3 0%, #7db9e8 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#2b20a3), color-stop(100%,#7db9e8)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top,  #2b20a3 0%,#7db9e8 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top,  #2b20a3 0%,#7db9e8 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top,  #2b20a3 0%,#7db9e8 100%); /* IE10+ */
background: linear-gradient(to bottom,  #2b20a3 0%,#7db9e8 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#2b20a3', endColorstr='#7db9e8',GradientType=0 ); /* IE6-9 */

 position:absolute;
  top: 7%;
  left:7%;
  height:86%;
  width:86%;
  -webkit-border-radius:50%;
  -webkit-box-shadow: inset 0 0 14px #000;
}
.shine {
  background: -moz-linear-gradient(top,  rgba(255,255,255,1) 0%, rgba(255,255,255,0) 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(255,255,255,1)), color-stop(100%,rgba(255,255,255,0))); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top,  rgba(255,255,255,1) 0%,rgba(255,255,255,0) 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top,  rgba(255,255,255,1) 0%,rgba(255,255,255,0) 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top,  rgba(255,255,255,1) 0%,rgba(255,255,255,0) 100%); /* IE10+ */
background: linear-gradient(to bottom,  rgba(255,255,255,1) 0%,rgba(255,255,255,0) 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#00ffffff',GradientType=0 ); /* IE6-9 */
position:absolute;
  top: 15%;
  left:20%;
  height:50%;
  width:60%;
  -webkit-border-radius:50%;
  opacity:.4;
}

.tick-marks {
 position:absolute;
  border: 1px dotted #BBB;
  top: 18%;
  left:18%;
  height:62%;
  width:62%;
  -webkit-border-radius:50%;
}
.needle-assembly {
position:absolute;
  top: 0%;
  left:46%;
  height:100%;
  width:10%;
}
.needle-holder {
position:relative;
  top:10%;
  left:0;
  height:60%;
  width:100%;
}
.needle {
  position:absolute;
  background-color:#A00;
  height:100%;
  width:20%;
  left:40%;
}
.needle-cap {
background: rgb(181,189,200); /* Old browsers */
background: -moz-linear-gradient(top,  rgba(181,189,200,1) 0%, rgba(130,140,149,1) 36%, rgba(40,52,59,1) 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(181,189,200,1)), color-stop(36%,rgba(130,140,149,1)), color-stop(100%,rgba(40,52,59,1))); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top,  rgba(181,189,200,1) 0%,rgba(130,140,149,1) 36%,rgba(40,52,59,1) 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top,  rgba(181,189,200,1) 0%,rgba(130,140,149,1) 36%,rgba(40,52,59,1) 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top,  rgba(181,189,200,1) 0%,rgba(130,140,149,1) 36%,rgba(40,52,59,1) 100%); /* IE10+ */
background: linear-gradient(to bottom,  rgba(181,189,200,1) 0%,rgba(130,140,149,1) 36%,rgba(40,52,59,1) 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#b5bdc8', endColorstr='#28343b',GradientType=0 ); /* IE6-9 */
  
  position:absolute;
  background-color:#555;
  top:59%;
  height:16%;
  width:100%;
  display: block;
  -webkit-border-radius:50%;
  z-index:999;
  -webkit-box-shadow: inset 0 -1px 1px rgba(0,0,0,0.5),
  inset 0 1px 1px rgba(255,255,255,0.8);
}

@-webkit-keyframes moveNeedleOne
{
from {-webkit-transform: rotate(0deg);}
to {-webkit-transform: rotate(360deg);}
}
@-webkit-keyframes moveNeedleTwo
{
from {-webkit-transform: rotate(-45deg);}
to {-webkit-transform: rotate(180deg);}
}
@-webkit-keyframes moveNeedleThree
{
from {-webkit-transform: rotate(0deg);}
to {-webkit-transform: rotate(360deg);}
}

.inner-circle {
 position:absolute;
  border: 1px dotted #BBB;
  top: 40%;
  left:40%;
  height:20%;
  width:20%;
  -webkit-border-radius:50%;
}

#first-gauge {
  -webkit-transform-origin:50% 50%;
  -webkit-animation: moveNeedleOne 2s infinite;
  -webkit-animation-direction:alternate;
}
#second-gauge {
  -webkit-transform-origin:50% 50%;
  -webkit-animation: moveNeedleTwo 3s infinite;
  -webkit-animation-direction:alternate;
}
#third-gauge {
  -webkit-transform-origin:50% 50%;
  -webkit-animation: moveNeedleThree 1s linear infinite;
}

.container {
background: rgb(125,126,125); /* Old browsers */
background: -moz-radial-gradient(center, ellipse cover,  rgba(125,126,125,1) 0%, rgba(14,14,14,1) 100%); /* FF3.6+ */
background: -webkit-gradient(radial, center center, 0px, center center, 100%, color-stop(0%,rgba(125,126,125,1)), color-stop(100%,rgba(14,14,14,1))); /* Chrome,Safari4+ */
background: -webkit-radial-gradient(center, ellipse cover,  rgba(125,126,125,1) 0%,rgba(14,14,14,1) 100%); /* Chrome10+,Safari5.1+ */
background: -o-radial-gradient(center, ellipse cover,  rgba(125,126,125,1) 0%,rgba(14,14,14,1) 100%); /* Opera 12+ */
background: -ms-radial-gradient(center, ellipse cover,  rgba(125,126,125,1) 0%,rgba(14,14,14,1) 100%); /* IE10+ */
background: radial-gradient(ellipse at center,  rgba(125,126,125,1) 0%,rgba(14,14,14,1) 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#7d7e7d', endColorstr='#0e0e0e',GradientType=1 ); /* IE6-9 fallback on horizontal gradient */
margin:60px auto;
  height:auto;
  width:450px;
-webkit-border-radius:50%;
  -webkit-box-shadow: inset 0 -2px 2px rgba(0,0,0,0.5),
  inset 0 2px 2px rgba(255,255,255,0.8), 0 0 10px #000;
}
              
            
!

JS

              
                
              
            
!
999px

Console