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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ add another resource

JavaScript

Babel includes JSX processing.

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

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

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

              
                <h1>UI Range Slider</h1>

<input type="range" value="20" class="green"/>
<input type="range" value="31" class="red"/>
<input type="range" value="42" class="blue"/>
<input type="range" value="53" class="orange"/>
<input type="range" value="64" class="purple"/>
<input type="range" value="75" class="gray"/>

<a href="https://codepen.io/alexsafayan/full/dszKt" target="_blank"><div class="one"><span>Fullscreen</span></div></a>

<a href="https://codepen.io/alexsafayan" target="_blank"><div class="two"><span>Follow me!</span></div></a>
              
            
!

CSS

              
                /* Import */
@import url("https://fonts.googleapis.com/css?family=Sniglet|Oswald");

body, html {
  margin: 0px; 
  padding: 0px; 
  background-color: #1abc9c; 
  font-family: Sniglet; 
  text-align: center; 
}

h1 {
  color: #ecf0f1; 
  text-align: center; 
  font-size: 40px; 
  margin: 0px; 
  height: 70px; 
}

input {
  -webkit-appearance: none; 
  width: 160px; 
  height: 20px; 
  margin: 10px 50px; 
  background: linear-gradient(to right, #16a085 0%, #16a085 100%); 
  background-size: 150px 10px; 
  background-position: center; 
  background-repeat: no-repeat; 
  overflow: hidden; 
  outline: none; 
  zoom: 130%; 
  display: block; 
  margin: auto; 
  margin-bottom: 30px; 
}

input::-webkit-slider-thumb {
  -webkit-appearance: none; 
  width: 20px; 
  height: 20px; 
  background: #27ae60; 
  position: relative; 
  z-index: 3; 
}

input::-webkit-slider-thumb:after {
  content: " "; 
  width: 160px; 
  height: 10px; 
  position: absolute; 
  z-index: 1; 
  right: 20px; 
  top: 5px; 
  background: #2ecc71; 
}

.green::-webkit-slider-thumb {
  background: #27ae60; 
}

.green::-webkit-slider-thumb:after {
  background: #2ecc71; 
}

.red::-webkit-slider-thumb {
  background: #c0392b; 
}

.red::-webkit-slider-thumb:after {
  background: #e74c3c; 
}

.blue::-webkit-slider-thumb {
  background: #2980b9; 
}

.blue::-webkit-slider-thumb:after {
  background: #3498db; 
}

.orange::-webkit-slider-thumb {
  background: #d35400; 
}

.orange::-webkit-slider-thumb:after {
  background: #e67e22; 
}

.purple::-webkit-slider-thumb {
  background: #8e44ad; 
}

.purple::-webkit-slider-thumb:after {
  background: #9b59b6; 
}

.gray::-webkit-slider-thumb {
  background: #7f8c8d; 
}

.gray::-webkit-slider-thumb:after {
  background: #95a5a6; 
}

.one {
  width: 0px; 
  height: 0px; 
  background-color: transparent; 
  line-height: 30px; 
  color: #ecf0f1; 
  cursor: pointer; 
  border: 70px solid transparent; 
  border-left: 70px solid #16a085; 
  border-top: 70px solid #16a085; 
  left: 0px; 
  top: 0px; 
  position: absolute; 
}

a {
  text-decoration: none; 
}

.one span {
  margin-left: -60px; 
  position: absolute; 
  margin-top: -40px; 
}

.two {
  width: 0px; 
  height: 0px; 
  background-color: transparent; 
  line-height: 30px; 
  color: #ecf0f1; 
  cursor: pointer; 
  border: 70px solid transparent; 
  border-right: 70px solid #16a085; 
  border-top: 70px solid #16a085; 
  right: 0px; 
  top: 0px; 
  position: absolute; 
}

.two span {
  margin-left: -15px; 
  position: absolute; 
  margin-top: -40px; 
  white-space: nowrap; 
}
              
            
!

JS

              
                /*     AlexSafayan.com
          Follow me!

      CCCCCC         DDDD
    CCC              DD  DD
   CC                DD   DDD
  CC                 DD     DD
  CC                 DD      D
  CC                 DD      D
  CC                 DD     DD
   CC                DD   DDD
    CCC              DD  DD
      CCCCCC         DDDD
      
      OOOOOO         EEEEEEEEEEEE
     OO    OO        EE
    OO      OO       EE
   OOO      OOO      EE
   OO        OO      EEEEEEEE
   OO        OO      EE
   OOO      OOO      EE
    OO      OO       EE
     OO    OO        EE
      OOOOOO         EEEEEEEEEEEE
      
*/
              
            
!
999px

Console