0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

bxslider ver3 実装テスト

Posted at

bxslider ver3 実装テスト

jquery1.5.2 の環境で画像スライダーを実装する必要があったので、bxslider var3での実装テスト。

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html lang="ja">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta http-equiv="content-style-type" content="text/css">
<meta http-equiv="content-script-type" content="text/javascript">
<title>bxslider test</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js"></script>
<script type="text/javascript" src="jquery.bxslider3.js"></script>
<script type="text/javascript">
$(document).ready(function(){
  $('.js-bxslider').bxSlider({
    slideWidth: 720,
    speed: 1000,
    pause: 4000,
    auto: true,
    pager: true,
    pagerSelector: '.slider_pager',
    prevSelector: '.slider_prev',
    nextSelector: '.slider_next',
    prevText: '&lt;',
    nextText: '&gt;',
  });
});
</script>
<style>
p,ul {
  margin: 0;
  padding: 0;
}
ul {
  list-style: none;
}
img {
  width: 100%;
  height: auto;
  vertical-align: top;
}

.sample {
  width: 720px;
}
.slider_nav {
  text-align: center;
}
.slider_nav a {
  display: inline-block;
  margin: 5px;
  text-decoration: none;
  line-height: 1;
  vertical-align: middle;
}
.slider_prev,
.slider_next,
.slider_pager {
  display: inline;
  vertical-align: top;
}
.slider_prev a,
.slider_next a {
  padding: 0 2px;
  background-color: #ccc;
  color: #fff;
  line-height: 20px;
}
.slider_pager a {
  overflow: hidden;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background-color: #ccc;
  text-indent: 100%;
  white-space: nowrap;
}
.slider_pager a.pager-active {
  background-color: #000;
}
</style>
</head>
<body>

<div class="sample">
  <ul class="slider js-bxslider">
    <li><img src="./images/photo.jpg"></li>
    <li><img src="./images/photo.jpg"></li>
    <li><img src="./images/photo.jpg"></li>
  </ul>
  <div class="slider_nav">
   <div class="slider_prev"></div>
   <div class="slider_pager"></div>
   <div class="slider_next"></div>
  </div>
</div>

</body>
</html>

以上です。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?