Git Product home page Git Product logo

lfr502-slide's Introduction

lfr502-slide

一个用原生JS实现的轮播图简易插件

快速开始

参数说明

调用方式

<script>
new LfrSlide({
  picwrap:'picwrap',
  prev:'prev',
  next:'next',
  number:5
})
</script>

test.html文件结构

<div id='wrap'>
  <div id='picwrap' style="left:0;">
    <img src='./assert/1.jpg'>
    <img src='./assert/2.jpg'>
    <img src='./assert/3.jpg'>
    <img src='./assert/4.jpg'>
    <img src='./assert/5.jpg'>
  </div>
  <span id='prev'>&lt;</span><span id='next'>&gt;</span>
  <div id='controls'>
    <span class='on' data-index='0'></span>
    <span data-index='1'></span>
    <span data-index='2'></span>
    <span data-index='3'></span>
    <span data-index='4'></span>
  </div>
</div>

必传参数:

picwrap //图片父盒子ID prev //上翻按钮ID next //下翻按钮ID

选传参数:

number //轮播图片数量(轮播变换次数) clickSpan //鼠标点击图片下方小圆点能否发生图片切换,默认为true touchStop //鼠标移入图片时轮播是否发生暂停,默认为true moveTime //图片切换时间,默认为3000ms

问题交流

https://github.com/lvfangren/lfr502-slide/issues

关于作者

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.