jQueryとCSSを使用して垂直スライダーを作成したいと考えています。ここに私のコードは次のとおりです。JQueryとCSSを使用して垂直カルーセルニューススライダーを行うには?
HTML & JavaScriptの
<script>
$.fn.cycle.defaults.autoSelector = '.slideshow';
</script>
<div class="slideshow vertical" data-cycle-fx=carousel data-cycle-timeout=0 data-cycle-next="#next3" data-cycle-prev="#prev3" data-cycle-carousel-visible=2 data-cycle-carousel-vertical=true>
<img src="http://malsup.github.io/images/beach1.jpg">
<img src="http://malsup.github.io/images/beach2.jpg">
<img src="http://malsup.github.io/images/beach3.jpg">
<img src="http://malsup.github.io/images/beach4.jpg">
<img src="http://malsup.github.io/images/beach5.jpg">
<img src="http://malsup.github.io/images/beach9.jpg">
</div>
<div class="center">
<button id="prev3">∧ Prev</button>
<button id="next3">∨ Next</button>
</div>
しかし、それだけで2つの画像を見せているCSS
.slideshow {
margin: auto;
position: relative;
overflow: hidden;
height: 200px;
}
.slideshow img {
width: 100px;
height: 100px;
padding: 2px;
}
div.responsive img {
width: auto;
height: auto
}
.cycle-pager {
position: static;
margin-top: 5px
}
。私は3つまたは4つの画像を表示したい。
私はCodePenも持っていますが、スライダーのテキストは1つしか表示されません。 どのように変更して2〜3にすることができますか?
https://codepen.io/danbhala/pen/eNZrQW別のリンクはhttp://jsfiddle.net/kc723a4u/ –
あなたの投稿を修正しました。コードを正しく書式設定する方法を学び、良い質問をしてください:http://stackoverflow.com/help/how-to-ask –