jQuery 插件 jSlider 图片轮播

jSlider是一个非常好的图片轮播插件。

有导航箭头,可以自动播放,可以循环播放。

官方网站 https://github.com/copthuy/jSlider

DOCTYPE html>
<html lang="zh">
    <head>
        <meta charset="utf-8">
        <title>jSlidertitle>
        <meta name="description" content="jSlider JS example">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        
        <link rel="stylesheet" href="jSlider.min.css">
    head>
    <body>
     
        <div class="jSlider" id="slider-example">
            <div><img src="images/photo1.png">div>
            <div><img src="images/photo2.png">div>
            <div><img src="images/photo3.png">div>
            <div><img src="images/photo4.png">div>
            <div><img src="images/photo5.png">div>
            <div><img src="images/photo6.png">div>
        div>
         
        <script src="https://ajax.aspnetcdn.com/ajax/jquery/jquery-3.3.1.min.js">
        script>
        
        <script src="jquery.jSlider.min.js">script> 
         
        <script>
            $('#slider-example').sliderInit({
              'navigation': 'hover', 
              'indicator': 'always', 
              'speed': 500,    //速度
              'delay': 5000,    //延迟
              'transition': 'slide', 
              'loop': true, 
              'group': 1
            });     
        script>
    body>
html>

 

转载于:https://www.cnblogs.com/hzyhx/p/10958199.html

你可能感兴趣的:(javascript)