Code Monkey home page Code Monkey logo

html5show's Introduction

html5show

Cool animation html building library, based on the power of CSS3 animation in modern browsers, it's lightweight,fast, responsive ! it's for both developers and designers, you just need to write simple Html, then left all other things to the library.

It can be used to create sliders,welcome pages,presentations etc

Browser compatibility: Chrome,Safari,Firefox,Opera,Edge,ie11(ie10 will be supported recently)

##Features

  • Fast and Lightweight
  • Standard HTML,CSS3 based
  • Flexible,responsive
  • Support Url hash
  • Easy to reuse,customize and extend

##Demo html5show demo

##Document html5show docs

Getting Started

Add stylesheet to the element of your html.

   <link rel="stylesheet" type="text/css" href="{path}/html5show.css">

Put html5show.js to appropriate place (commonly before the ) of your html.

  <script type="text/javascript" src="{path}/html5show.min.js"></script>

Add a container in which you put the animation pages.

<div id="showbox">

</div>

Set the container size,make sure position is relative or absolute,set overflow hidden.

/* this is just an example */
#showBox{
  width:500px
  height:300px;
  position: absolute;
  overflow: hidden;
}

Add animation pages and sprite elements in it,set class:'page' to each page element.

<div id="showBox">
   <div class="page">
       <h1>Hello html5show</h1>
       <p>Amazing</p>
       <p>Flexible</p>
       <p>Powerful</p>
   </div>
   <div class="page">
     ...
   </div>
</div>

Now, let's add some magic , add dataset attributes to the elements which set the showtime and animation.

<div id="showBox">
    <div class="page">
        <h1 data-time="0.5" data-show="expandOpen">Hello html5show</h1>
        <p data-time="1" data-show="fadeInLeft">Amazing</p>
        <p data-time="1.25" data-show="fadeInLeft">Flexible</p>
        <p data-time="1.5" data-show="fadeInLeft">Powerful</p>
    </div>
    <div class="page">
      <h2>page2</h2>
    </div>
 </div>

Last Step,using Javascript to create the html5show. It's down.

  (function(){
    var show = new html5show('showBox',{play:true});
  })();

To see the result , welcome to html5show home. Visit docs for more details, and demo page to see some advanced usages.

License

MIT © Sandy Duan

html5show's People

Contributors

sandywalker avatar

Watchers

James Cloos avatar  Lei Xiaopeng 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.