티스토리 뷰
html
<div class="visual-con visual-con01 on">
<img src="/include/img/main-visual01.png" alt="" class="t-show">
<img src="" alt="" class="m-show">
<div class="visual-text">
<h2>title</h2>
<span>sub title</span>
</div>
</div>
<div class="visual-con visual-con02">
<img src="/include/img/main-visual01.png" alt="" class="t-show">
<img src="" alt="" class="m-show">
<div class="visual-text">
<h2>title</h2>
<span>sub title</span>
</div>
</div>
<div class="visual-con visual-con03">
<img src="/include/img/main-visual01.png" alt="" class="t-show">
<img src="" alt="" class="m-show">
<div class="visual-text">
<h2>title</h2>
<span>sub title</span>
</div>
</div>
css
.slick-slide.on .visual-text h2{-webkit-animation:visualTextUp 0.5s linear forwards;animation:visualTextUp 0.5s linear forwards;}
.slick-slide.on .visual-text span{-webkit-animation:visualTextUp 0.5s .7s linear forwards;animation:visualTextUp 0.5s .7s linear forwards;}
.slick-slide.on .visual-text h2, .visual .slick-slide.on .visual-text strong, .visual .slick-slide.on .visual-text span{-webkit-transform-style: preserve-3d;-webkit-backface-visibility: hidden;-webkit-transform: translate3d(0, 0, 0);-webkit-perspective: 1000;-webkit-backface-visibility: hidden;}
jQuery
$('.visual').on('beforeChange', function (event, slick, currentSlide) {
$('.slick-slide').removeClass('on');
});
$('.visual').on('afterChange', function (event, slick, currentSlide) {
$('.slick-slide').removeClass('on');
$('.slick-current').addClass('on');
});
'WebPublisher' 카테고리의 다른 글
[php] if 조건문으로 클래스 부여 (0) | 2021.11.09 |
---|---|
[daterangepicker] 데이트피커 (0) | 2021.11.09 |
[jQuery/slick] 슬릭 슬라이더 현재 페이지 나타내기 (0) | 2021.10.14 |
[html] 구글 번역기 플러그인 삽입 (default language 설정) (0) | 2021.10.07 |
[jQuery] 선택자에 변수 넣기 (0) | 2021.10.02 |
공지사항