to
: ~로 보내다gsap.to('.image-2',{
x:200
})
gsap.to('.image-3',{
x:400
})
gsap.to('.image-2',{
xPercent:200
})
gsap.to('.image-3',{
xPercent:400
})
from
: ~ 로 시작할때 사용 ??textMotion1.from('.sc-intro .desc .line',{opacity:0}
stagger
: 하나씩 순차적으로 효과 적용되게 할 때 사용textMotion1.from('.sc-intro .desc .line',{opacity:0, stagger:0.1}
** 이떄 묶여있는 항목 말고 다른항목도 같이 껴서 stagger 적용시키고싶으면, 아래와 같이, data를 사용해서 data로 묶어주면됨
ex) 아래와 같이 data-motion="text"로 묶은 뒤, jQuery로 묶은걸 선택하면됨
<span class="line" data-motion="text">1</span>
<span class="line" data-motion="text">2</span>
<span class="line" data-motion="text">2</span>
<a href="" data-motion="text">회사 소개 바로가기</a>
textMotion1.from('.sc-intro [data-motion="text"],{opacity:0, stagger:0.1})
timeline
: 시간순서대로 실행되는것ex1)
circleMotion = gsap.timeline({})
circleMotion.to('.image-2',{
x:200
})
circleMotion.to('.image-3',{
x:400
})
ex2)
circleMotion = gsap.timeline({})
circleMotion.to('.image-2',{
x:200
},'a')
circleMotion.to('.image-3',{
x:400)
},'a')
scorollTriger
: 시작지점 설정하기trigger
: 시작되는 지점 선택자로 선택start
: 시작지점end
: 끝지점markers
: 표시자toggleClass:"active"
: 토글기능을 적용시켜 트리거에 걸렸을때, 기능작동 / 벗어나면 기능작동x되게 하는 명령어onEnter:function(){}
: 도달했을때 ~~기능실행하는 명령어onLeave:function(){}
: 떠났을때 ~~기능실행하는 명령어onEnterBack:function(){}
: 떠났다가 다시 돌아왔을때 ~~기능실행하는 명령어onLeaveBack:function(){}
: 도달했다가 다시 올라갈때 ~~기능 실행하는 명령어scrollTrigger.create
: 그냥 스크롤트리거만 생성할 때 사용.toggleActions:"x1 x2 x3 x4"
:scrollTrigger:{
toggleActions:"play none none reverse";
(해당지점에 도달했을때 실행되고, 떠났을때/떠났다가 다시돌아왔을때 아무거도 실행안되고, 도달했다가 다시 올라갈때 실행하기 전으로 되돌리라는 뜻.)
};
.sc-history의 image를 선택했고,그 이미지기준 0%지점에서 시작점, 100%지점에서 끝점 을 하나의 기준으로 잡고 / window기준 50%기준 시작점, 50%기준 끝점 을 다른 기준으로 해서 작동시키고, 마커를 표시한다는 뜻
scrollTrigger: { trigger:".sc-history .image", start:"0% 50%", end:"100% 50%", markers:true, }
.sc-history의 image를 선택했고,그 이미지기준 0%지점에서 시작점, 100%지점에서 끝점 을 하나의 기준으로 잡고 / window기준 50%기준 시작점, 50%기준 끝점 을 다른 기준으로 해서 작동시키고, 마커를 표시하고,
마우스가 도달했을때, '.sc-history .image'에 'active'클래스를 추가하고, 도달했다가 다시 올라갈때, '.sc-history .image'에 'active'클래스를 제거한다.
떠나거나, 떠났다가 다시돌아온건 function에 아무거도 없으니 아무작동안함.ScrollTrigger.create({ trigger:".sc-history .image", start:"0% 50%", end:"100% 50%". markers:true, onEnter:function(){ $('.sc-history .image').addClass('active'); }, onLeave:function(){}, onEnterBack:function(){}, onLeaveBack:function(){ $('.sc-history .image').removeClass('active'); }, })
1:27:46 그림,텍스트바뀌는곳
이미지, 글자 first / top 바뀌는곳 아예 통쨰로 이해안됨
sticky 높이차지 이해안됨
1:30:05 여기서부터 고정이 되어있었으면 좋겠어요가 무슨말인지 뭘하려는지 의도조차파악불가 밑에있는애가 깔려서나온다..? 무슨말인지 무슨목적인지 용도가뭔지 아예파악불가
1:30:30 밑에도 고정시키고싶다? 가 무슨말인지 모르겠음. 수정전 / 수정후 화면에서 차이를 못느끼겠음
margin-top:-100vh / margin-bottom:-100vh 써서 달라진게뭔지 뭐가 고정되는건지 파악불가
오다가 밑에서고정되고싶다? 가 무슨말인지 파악불가
position:relative; 왜주는건지
z-index 왜주는건지?
부모요소에 position:relative가 있어야, 자식이 position:sticky를 쓸수있는건지?
2:02:10에서 align-items: flex-start;를 준 이유가뭔지? 위치가 바뀐건 없어보이는데