PIXNET Logo登入

12:12

跳到主文

紀錄、想像、實現

部落格全站分類:數位生活

  • 相簿
  • 部落格
  • 留言
  • 名片
  • 7月 13 週一 201511:30
  • GSAP Timeline Lite scroll 抖動

原因在於scroll時動畫不斷重新play,在progress加上.pause()即可解決:
$(window).on("scroll", function(){
var top = $(window).scrollTop();
var percentofprogress=(top+$(window).height())/($(document).height()-$(window).height());
//console.log(top);
//console.log(top/($doc.height()-$win.height()));
tl.progress(percentofprogress).pause();
} )
(繼續閱讀...)
文章標籤

陳阿全 發表在 痞客邦 留言(0) 人氣(60)

  • 個人分類:js
▲top
  • 5月 09 週四 201319:26
  • js 動態換圖

筆記一下( 5月lovelybox html )
var add = document.getElementById("big1");
var image = new Image();
image.onload=function(){
add.appendChild(image);
$(add).animate({opacity:0.5},0).animate({opacity:1},250);
}
var imgurlary = ["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t"];
function dfun() {
for(var i = 0;i < 20;i++) {
(function(i) {
$("#small" + String(i + 1)).mouseover(function() {
image.src="stylesheets/images/products_"+imgurlary[i]+".png";
}).mouseout(function(){add.removeChild(image)})
}
)(i)
}
}
dfun();
(繼續閱讀...)
文章標籤

陳阿全 發表在 痞客邦 留言(0) 人氣(119)

  • 個人分類:js
▲top
1

最新文章

  • 這是測試文章
  • GSAP Timeline Lite scroll 抖動
  • CSS3 3D
  • js 動態換圖
  • 這功能真方便
  • test
  • test
  • 筆墨大晉級之二
  • flash object style
  • 共同攜手˙戰勝乳癌 ˙點亮台灣

文章精選

地球關燈日

版頭連結(勿動)

痞客邦9週年生日慶

test

個人資訊

陳阿全
暱稱:
陳阿全
分類:
數位生活
好友:
累積中
地區:

痞客邦十周年生日慶網路活動