jquery滚动图片代码-jquery实现图片水平滚动效果代码分享

2023-09-07 0 1,096 百度已收录

抽象的

本文阐述了jquery实现图像水平滚动的效果jquery滚动图片代码jquery滚动图片代码,分享给大家,供大家参考。 详情如下:

操作效果图: -------------------检查功效------------------

jquery滚动图片代码-jquery实现图片水平滚动效果代码分享

提示:如果浏览器无法正常工作

文章正文

jquery滚动图片代码-jquery实现图片水平滚动效果代码分享

本文阐述了jquery实现图像水平滚动的效果,分享给大家,供大家参考。 详情如下:

jquery滚动图片代码-jquery实现图片水平滚动效果代码分享

操作效果图: -------------------检查功效------------------

jquery滚动图片代码-jquery实现图片水平滚动效果代码分享

提示:如果浏览器无法正常工作,您可以尝试切换浏览模式。

为大家分享图片水平滚动效果的jquery代码如下:



jquery实现图片水平滚动效果










$(document).ready(function(){
 // cover flip effects //
 //var noOfArtists = 31; //jx
 var noOfArtists = 7; //jx
 
 $('#flip').jcoverflip({
 current: 0,
 
 beforeCss: function(el, container, offset){
  return [$.jcoverflip.animationElement(el, {
  left: (container.width() / 2 - 220 - 150 * offset + 20 * offset) + 'px',
  bottom: '20px'
  }, {}), $.jcoverflip.animationElement(el.find('img'), {
  width: Math.max(10, 120 - 0 * offset * offset) + 'px'
  }, {})];
 },
 afterCss: function(el, container, offset){
  return [$.jcoverflip.animationElement(el, {
  left: (container.width() / 2 + 100 + 130 * offset) + 'px',
  bottom: '20px'
  }, {}), $.jcoverflip.animationElement(el.find('img'), {
  width: Math.max(10, 120 - 0 * offset * offset) + 'px'
  }, {})];
 },
 currentCss: function(el, container){
  return [$.jcoverflip.animationElement(el, {
  left: (container.width() / 2 - 80) + 'px',
  bottom: '20px'
  }, {}), $.jcoverflip.animationElement(el.find('img'), {
  width: '160px'
  }, {})];
 },
 change: function(event, ui){
  //jx $('#scrollbar').slider('value', ui.to * 10);
  $('#scrollbar').slider('value', ui.to * (100 / (noOfArtists - 1))); //jx
 }
 });
 
 $('#scrollbar').slider({
 //jx value: 50,
 value: 0, //init. pic is the beginning of the artists list, so change from 50 (middle) to 0
 //jx step: 10,
 step: 100 / (noOfArtists - 1), //jx
 stop: function(event, ui){
  if (event.originalEvent) {
  //jx var newVal = Math.round(ui.value / 10);
  var newVal = Math.round(ui.value / 100 * (noOfArtists - 1)); //jx
  $('#flip').jcoverflip('current', newVal);
  //jx $('#scrollbar').slider('value', newVal * 10);
  $('#scrollbar').slider('value', newVal / (noOfArtists - 1) * 100); //jx
  }
 }
 });
 // cover flip effects //
});



收藏 (0) 打赏

感谢您的支持,我会继续努力的!

打开微信/支付宝扫一扫,即可进行扫码打赏哦,分享从这里开始,精彩与您同在
点赞 (0)

悟空资源网 jquery jquery滚动图片代码-jquery实现图片水平滚动效果代码分享 https://www.wkzy.net/game/195885.html

常见问题

相关文章

官方客服团队

为您解决烦忧 - 24小时在线 专业服务