GithubHelp home page GithubHelp logo

js-slideshow's Introduction

follow the following to get started:

import styles using:

import js using:

<script src="./node_modules/js-slideshow/index.js"></script>

for using 3 images in the slideshow use:

<script src="./node_modules/js-slideshow/index3.js"></script>

NOTE: if you use three images in the slideshow, make sure you reduce number images in the html file template below.

create html file with the following contents(only change img src!!):

<div class="img-cont"> <img class="img" src="https://resources.premierleague.com/photos/2021/08/10/331e43df-4467-4795-82ba-255aa6ee2fce/03930_PP_Generic_Mens_Promo-Header_530x400.jpg?width=500&height=333" alt=""> <img class="img" src="https://resources.premierleague.com/photos/2021/08/10/331e43df-4467-4795-82ba-255aa6ee2fce/03930_PP_Generic_Mens_Promo-Header_530x400.jpg?width=500&height=333" alt=""> <img class="img" src="https://resources.premierleague.com/photos/2021/08/10/331e43df-4467-4795-82ba-255aa6ee2fce/03930_PP_Generic_Mens_Promo-Header_530x400.jpg?width=500&height=333" alt=""> <img class="img" src="https://resources.premierleague.com/photos/2021/08/10/331e43df-4467-4795-82ba-255aa6ee2fce/03930_PP_Generic_Mens_Promo-Header_530x400.jpg?width=500&height=333" alt=""> <img class="img" src="https://resources.premierleague.com/photos/2021/08/10/331e43df-4467-4795-82ba-255aa6ee2fce/03930_PP_Generic_Mens_Promo-Header_530x400.jpg?width=500&height=333" alt=""> <img class="img" src="https://resources.premierleague.com/photos/2021/08/10/331e43df-4467-4795-82ba-255aa6ee2fce/03930_PP_Generic_Mens_Promo-Header_530x400.jpg?width=500&height=333" alt=""> <img class="img" src="https://resources.premierleague.com/photos/2021/08/10/331e43df-4467-4795-82ba-255aa6ee2fce/03930_PP_Generic_Mens_Promo-Header_530x400.jpg?width=500&height=333" alt=""> <img class="img" src="https://resources.premierleague.com/photos/2021/08/10/331e43df-4467-4795-82ba-255aa6ee2fce/03930_PP_Generic_Mens_Promo-Header_530x400.jpg?width=500&height=333" alt=""> <img class="img" src="https://resources.premierleague.com/photos/2021/08/10/331e43df-4467-4795-82ba-255aa6ee2fce/03930_PP_Generic_Mens_Promo-Header_530x400.jpg?width=500&height=333" alt=""> </div>

For customization for example you want to create 6 images slideshow:

-make the html file img tags 6; -go to index.js find the following lines and delete from celget[7] to celget[9]

"celget[0].style.transform = 'rotateY(' + 0 + 'deg)'+ 'translateZ'+deg1 ; celget[1].style.transform = 'rotateY(' + num + 'deg)'+ 'translateZ'+deg1 ; celget[2].style.transform = 'rotateY(' + 2num + 'deg)'+ 'translateZ'+deg1 ; celget[3].style.transform = 'rotateY(' + 3num + 'deg)'+ 'translateZ'+deg1 ; celget[4].style.transform = 'rotateY(' + 4num + 'deg)'+ 'translateZ'+deg1 ; celget[5].style.transform = 'rotateY(' + 5num + 'deg)'+ 'translateZ'+deg1 ; celget[6].style.transform = 'rotateY(' + 6num + 'deg)'+ 'translateZ'+deg1 ; celget[7].style.transform = 'rotateY(' + 7num + 'deg)'+ 'translateZ'+deg1 ; celget[8].style.transform = 'rotateY(' + 8*num + 'deg)'+ 'translateZ'+deg1 ;"

-make a html file with 6 img tags and enjoy!!!

REMEMBER THAT YOU CANNOT USE MORE THAN 9 IMAGES!! But if you want those modify using your knowledge wisely

js-slideshow's People

Contributors

ndungtse avatar

Watchers

 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.