cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

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.

Quick-add: + add another resource

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.

Quick-add: + add another resource

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.

            
              <div class="stuff">
    
    <h1>Modern, Cute, Usable Sliders.</h1>

    <main>
        <div id="flat-slider"></div>
        <div id="flat-slider-vertical-1"></div>
        <div id="flat-slider-vertical-2"></div>
        <div id="flat-slider-vertical-3"></div>
    </main>

    <p>Check them out and even more at: <a href="https://simeydotme.github.io/jQuery-ui-Slider-Pips/#styling-flat" target="_blank">https://simeydotme.github.io/</a></p>

    <p>Heavily inspired by <a target="_blank" href="https://codepen.io/thebabydino/pen/RNEEZP">Ana Tudor's Codepen</a> where she does some amazing (and way too complicated for me) css tricks to style HTML5 range inputs in a similar style.</p>

</div>
            
          
!
            
              $bg: #434d5a;

[id*=flat-slider].ui-slider,
[id*=flat-slider].ui-slider .ui-slider-pip .ui-slider-line {
    background: lighten($bg, 25%);
}

[id*=flat-slider].ui-slider .ui-slider-handle .ui-slider-tip:after {
    border-left-color: #434d5a;
}


[id*=flat-slider].ui-slider .ui-slider-handle.ui-state-hover, 
[id*=flat-slider].ui-slider .ui-slider-handle.ui-state-focus, 
[id*=flat-slider].ui-slider .ui-slider-handle.ui-state-active {
      border-color: white; }









body {
    background: #434d5a;
    font-family: "Roboto";
}
h1 {
    color: lighten($bg, 25%);
    padding: 0;
    margin: 0;
    user-select: none;
    cursor: default;
}
p {
    color: lighten($bg, 50%);
    text-align: center;
    margin: 0.5em 1em;
    font-weight: 300;
    font-size: 1.3em;
    
    &:nth-of-type(1) {
        margin-top: 3em;
    }
    
    &:last-child {
        font-weight: 100;
        font-size: 1em;
        a {
            font-weight: 300;
        }
    }
}

.stuff {
    
    padding: 50px 50px 50px;
    max-width: 900px;
    margin: auto;
    
}

@import url(https://fonts.googleapis.com/css?family=Roboto:100,300,600);
            
          
!
            
              $.extend( $.ui.slider.prototype.options, { 
    animate: 300
});

$("#flat-slider")
    .slider({
        max: 50,
        min: 0,
        range: true,
        values: [15, 35]
    })
    .slider("pips", {
        first: "pip",
        last: "pip"
    });

$("#flat-slider-vertical-1")
    .slider({
        max: 25,
        min: 0,
        range: "min",
        value: 25,
        orientation: "vertical"
    });

    $("#flat-slider-vertical-2")
    .slider({
        max: 25,
        min: 0,
        range: "max",
        value: 12,
        orientation: "vertical"
    });

$("#flat-slider-vertical-3")
    .slider({
        max: 25,
        min: 0,
        range: "min",
        value: 0,
        orientation: "vertical"
    });

    $("#flat-slider-vertical-1, #flat-slider-vertical-2, #flat-slider-vertical-3")
    .slider("pips", {
        first: "pip",
        last: "pip"
    })
    .slider("float");
            
          
!
999px
Loading ..................

Console