Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs 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 its URL and the proper URL extension.

+ 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

Auto Save

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

              
                <!--

Based on: http://media02.hongkiat.com/photoshop-ui-tutorials/1-useful-user-interface-tutorials-photoshop.jpg

-->

<div class="knob"></div>
<h1>Big Knob</h1>
              
            
!

CSS

              
                @import url(https://fonts.googleapis.com/css?family=Raleway:200);

* { padding: 0; margin: 0; }
html, body { background: #222; }

h1 {
  color: #444;
  font: normal 300%/1em Raleway, sans-serif;
  text-align: center;
  text-transform: uppercase;
  text-shadow: 0 -2px 1px rgba(0,0,0,0.5);
}

.knob {
  width: 320px;
  height: 320px;
  margin: 80px auto 40px;
  position: relative;
  
  border-radius: 50%;
  background: #222;
  
  box-shadow:
    0 -5px 40px rgba(255,255,230,0.05),
    inset 0 0 0 5px rgba(0,0,0,0.8),
    inset 0 2px 5px 5px rgba(255,255,230,0.1),
    inset 0 0 20px 25px rgba(0,0,0,0.35),
    inset 0 0 0 45px rgba(255,255,230,0.15),
    inset 0 0 0 47px rgba(0,0,0,0.8),
    inset 0 1px 1px 49px rgba(255,255,230,0.08),
    inset 0 0 5px 55px rgba(25,25,0,0.3),
    inset 0 20px 5px 60px rgba(255,255,200,0.08),
    
    -172px 84px 3px -155px rgba(255,255,255,1),
    -172px 84px 10px -152px rgba(255,225,100,0.8),
    -172px 84px 1px -153px rgba(255,225,0,1),
    -172px 84px 0 -150px rgba(0,0,0,1),
    
    -186px 42px 3px -155px rgba(255,255,255,1),
    -186px 42px 10px -152px rgba(255,225,100,0.8),
    -186px 42px 1px -153px rgba(255,225,0,1),
    -186px 42px 0 -150px rgba(0,0,0,1),
    
    -190px 0 3px -155px rgba(255,255,255,1),
    -190px 0 10px -152px rgba(255,225,100,0.8),
    -190px 0 1px -153px rgba(255,225,0,1),
    -190px 0 0 -150px rgba(0,0,0,1),
    
    -186px -42px 3px -155px rgba(255,255,255,1),
    -186px -42px 10px -152px rgba(255,225,100,0.8),
    -186px -42px 1px -153px rgba(255,225,0,1),
    -186px -42px 0 -150px rgba(0,0,0,1),
    
    -172px -84px 3px -155px rgba(255,255,255,1),
    -172px -84px 10px -152px rgba(255,225,100,0.8),
    -172px -84px 1px -153px rgba(255,225,0,1),
    -172px -84px 0 -150px rgba(0,0,0,1),
    
    -150px -118px 3px -155px rgba(255,255,255,1),
    -150px -118px 10px -152px rgba(255,225,100,0.8),
    -150px -118px 1px -153px rgba(255,225,0,1),
    -150px -118px 0 -150px rgba(0,0,0,1),
    
    -120px -148px 3px -155px rgba(255,255,255,1),
    -120px -148px 10px -152px rgba(255,225,100,0.8),
    -120px -148px 1px -153px rgba(255,225,0,1),
    -120px -148px 0 -150px rgba(0,0,0,1),
    
    -84px -172px 3px -155px rgba(255,255,255,1),
    -84px -172px 10px -152px rgba(255,225,100,0.8),
    -84px -172px 1px -153px rgba(255,225,0,1),
    -84px -172px 0 -150px rgba(0,0,0,1),
    
    -42px -186px 3px -155px rgba(255,255,255,1),
    -42px -186px 10px -152px rgba(255,225,100,0.8),
    -42px -186px 1px -153px rgba(255,225,0,1),
    -42px -186px 0 -150px rgba(0,0,0,1),
    
    0 -190px 3px -155px rgba(255,255,255,1),
    0 -190px 10px -152px rgba(255,225,100,0.8),
    0 -190px 1px -153px rgba(255,225,0,1),
    0 -190px 0 -150px rgba(0,0,0,1),
    
    42px -186px 0 -150px rgba(0,0,0,1),
    42px -184px 3px -150px rgba(255,255,255,0.15),
    
    84px -172px 0 -150px rgba(0,0,0,1),
    84px -170px 0 -150px rgba(255,255,255,0.15),
    
    120px -148px 0 -150px rgba(0,0,0,1),
    120px -146px 0 -150px rgba(255,255,255,0.15),
    
    150px -118px 0 -150px rgba(0,0,0,1),
    150px -116px 0 -150px rgba(255,255,255,0.15),
    
    172px -84px 0 -150px rgba(0,0,0,1),
    172px -82px 0 -150px rgba(255,255,255,0.15),
    
    186px -42px 0 -150px rgba(0,0,0,1),
    186px -40px 0 -150px rgba(255,255,255,0.15),
    
    190px 0 0 -150px rgba(0,0,0,1),
    190px 2px 0 -150px rgba(255,255,255,0.15),
    
    186px 42px 0 -150px rgba(0,0,0,1),
    186px 44px 0 -150px rgba(255,255,255,0.15),
    
    172px 84px 0 -150px rgba(0,0,0,1),
    172px 86px 0 -150px rgba(255,255,255,0.15);
}

.knob:before {
  content: '';
  display: block;
  box-sizing: border-box;
  
  width: 180px;
  height: 180px;
  margin: auto;
  position: relative;
  top: 50%;
  transform: translateY(-50%);
  
  border-radius: 50%;
  background-color: #ddd;
  background-image:
    linear-gradient(rgba(0,0,0,0) 40%, rgba(0,0,0,0.2)),
    linear-gradient(-100deg, rgba(0,0,0,0) 47%, rgba(0,0,0,0.035) 53%),
    linear-gradient(30deg, rgba(0,0,0,0.035) 47%, rgba(0,0,0,0) 53%),
    linear-gradient(-230deg, rgba(0,0,0,0) 48%, rgba(0,0,0,0.035) 52%),
    linear-gradient(330deg, rgba(0,0,0,0.03) 48%, rgba(0,0,0,0) 52%);
  box-shadow:
    0 -30px 80px rgba(255,255,255,0.3),
    0 30px 80px rgba(0,0,0,0.8),
    0 75px 20px rgba(0,0,0,0.5),
    inset 0 3px 1px rgba(255,255,255,1),
    inset 0 -3px 1px rgba(0,0,0,0.3);
}

.knob:after {
  content: '';
  display: block;
  
  width: 10px;
  height: 25px;
  margin: auto;
  position: absolute;
  top: 15px;
  left: 50%;
  transform: translateX(-50%);
  
  border-radius: 3px;
  background-color: #333;
  
  box-shadow: inset 0 1px 2px 1px rgba(0,0,0,1);
}
              
            
!

JS

              
                // Copyright (c) 2014 Josh Bader at Codepen (https://codepen.io/joshbader/)
              
            
!
999px

Console