轮播图(转发)

原文:https://bxslider.com/install/

Install

? The Easy Way
 Click the numbers to learn about each section.

<html>
<head>
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/bxslider/4.2.12/jquery.bxslider.css">
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
  <script src="https://cdn.jsdelivr.net/bxslider/4.2.12/jquery.bxslider.min.js"></script>
  <script>
    $(document).ready(function(){
      $('.slider').bxSlider();
    });
  </script>
</head>
<body>
  <div class="slider">
    <div>I am a slide.</div>
    <div>I am another slide.</div>
  </div>
</body>
</html>
1
2
3
? The Other Ways

Manual

2. Include in your webpage

// Links to the libraries needed
<link rel="stylesheet" href="/path/to/jquery.bxslider.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script src="/path/to/jquery.bxslider.min.js"></script>
// Initialize the slider
<script>
  $(document).ready(function(){
    $('.slider').bxSlider();
  });
</script>
// Slider HTML (change this to your own!)
<div class="slider">
  <div>I am a slide.</div>
  <div>I am another slide.</div>
</div>

Bower

1. Run from a command line

bower install bxslider --save
2. Include in your webpage

// Links to the libraries needed
<link rel="stylesheet" href="/bower_components/bxslider/dist/jquery.bxslider.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script src="/bower_components/bxslider/dist/jquery.bxslider.min.js"></script>
// Initialize the slider
<script>
  $(document).ready(function(){
    $('.slider').bxSlider();
  });
</script>
// Slider HTML (change this to your own!)
<div class="slider">
  <div>I am a slide.</div>
  <div>I am another slide.</div>
</div>

NPM

1. Run from a command line

npm install bxslider --save
2. Include in your webpage

// Links to the libraries needed
<link rel="stylesheet" href="/node_modules/bxslider/dist/jquery.bxslider.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script src="/node_modules/bxslider/dist/jquery.bxslider.min.js"></script>
// Initialize the slider
<script>
  $(document).ready(function(){
    $('.slider').bxSlider();
  });
</script>
// Slider HTML (change this to your own!)
<div class="slider">
  <div>I am a slide.</div>
  <div>I am another slide.</div>
</div>

说点什么

avatar
  Subscribe  
提醒