css3 slide滑动焦点图 文字或者图片均支持
css3 slide滑动焦点图 文字或者图片均支持
XML/HTML Code
- <div class="slider">
- <ul class="slides">
- <li class="slide"><div class="box" style="background-color: #1abc9c;"></div></li>
- <li class="slide"><div class="box" style="background-color: #16a085;"></div></li>
- <li class="slide"><div class="box" style="background-color: #f1c40f;"></div></li>
- <li class="slide"><div class="box" style="background-color: #f39c12;"></div></li>
- <li class="slide"><div class="box" style="background-color: #d35400;"></div></li>
- <li class="slide"><div class="box" style="background-color: #c0392b;"></div></li>
- </ul>
- </div>
JavaScript Code
- <script type="text/javascript">
- var glide = $('.slider').glide().data('api_glide');
- $(window).on('keyup', function (key) {
- if (key.keyCode === 13) {
- glide.jump(3, console.log('Wooo!'));
- };
- });
- glide.afterChange(function() {
- alert('lelele');
- });
- $('.slider-arrow').on('click', function() {
- console.log(glide.current());
- });
- </script>
相关推荐
周公周金桥 2020-09-06
大象从不倒下 2020-07-31
AlisaClass 2020-07-19
MaureenChen 2020-04-21
xingguanghai 2020-03-13
teresalxm 2020-02-18
木四小哥 2013-05-14
SoShellon 2013-06-01
Simagle 2013-05-31
羽化大刀Chrome 2013-05-31
waterv 2020-01-08
LutosX 2013-07-29
vanturman 2013-06-27
wutongyuq 2013-04-12
luoqu 2013-04-10
today0 2020-09-22
89520292 2020-09-18
bigname 2020-08-25