Giter Site home page Giter Site logo

csslider's Introduction

CSS Slider

Pure CSS, simple slider.

ight design

Examples

Here are some examples:

Supported browsers

  • Chrome (tested only on 30)
  • Firefox (tested only on 24)
  • IE
    • 9 No transitions
    • 10+ Works perfect
  • Opera (tested only on 12)

Installation

  • Include the CSS stylesheet at the end of <head> element:

     <link rel="stylesheet" href="/path/to/csslider.css" />
  • Put code into webpage:

     <div class="csslider">
         <input type="radio" name="slides" id="slides_1" checked />
         <input type="radio" name="slides" id="slides_2" />
         <input type="radio" name="slides" id="slides_3" />
         <input type="radio" name="slides" id="slides_4" />
         <input type="radio" name="slides" id="slides_N" />
         <ul>
             <li>Content of slide 1</li>
             <li>Content of slide 2</li>
             <li>Content of slide 3</li>
             <li>Content of slide 4</li>
             <li>Content of slide N</li>
         </ul>
         <div class="arrows">
             <label for="slides_1"></label>
             <label for="slides_2"></label>
             <label for="slides_3"></label>
             <label for="slides_4"></label>
             <label for="slides_N"></label>
             <label for="slides_1" class="goto-first"></label>
             <label for="slides_N" class="goto-last"></label>
         </div>
         <div class="navigation">
     	    <div>
             	<label for="slides_1"></label>
             	<label for="slides_2"></label>
             	<label for="slides_3"></label>
             	<label for="slides_4"></label>
             	<label for="slides_N"></label>
     	    </div>
         </div>
     </div>

    Code you can generate from JADE template file here

Global configuration

Default configuration can be set in LESS file.

Local configuration

If you want to change configuration for specific element you must override default config. For instance if you have an element with id #my-slider and you want to change:

  • arrows color

#my-slider .arrows label { border-left-color: red; border-right-color: red; } ```

  • inside navigation border

#my-slider.inside .navigation label { border: 1px solid red; } ```

csslider's People

Contributors

drygiel avatar

Watchers

James Cloos avatar Marcin Kaźmierczak avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.