Javascript & JQuery & CSS > Plug-In - Jquery.cycle2 ¸¦ ÀÌ¿ëÇÑ À̹ÌÁö ½½¶óÀ̵å¼î, ·Ñ¸µ ±¸ÇöÇϱâ
µî·ÏÀÏ : 2020-03-02 12:42
Á¶È¸¼ö : 53,359
http://ankyu.entersoft.kr/lecture/jquery/jquery.cycle2/test01.asp
http://ankyu.entersoft.kr/lecture/jquery/jquery.cycle2/test02.asp
http://ankyu.entersoft.kr/lecture/jquery/jquery.cycle2/test03.asp
<div class="cycle-slideshow">
<img src="/images/img1.jpg">
<img src="/images/img2.jpg">
<img src="/images/img3.jpg">
<img src="/images/img4.jpg">
</div>
À§¿Í °°Àº ÇüÅ·Π»ç¿ëÇÏ½Ã¸é µË´Ï´Ù.
¿É¼ÇÀº div¿¡ Àû¾îÁÖ¸é µË´Ï´Ù.
ÀÚ¹Ù½ºÅ©¸³Æ® ¼öÁ¤À» ÇÏÁö ¾Ê°í, css ¼öÁ¤À» ÇÏÁö ¾Ê°í div¿¡ ¹Ù·Î ¿É¼Ç¼³Á¤À» ÇÒ ¼ö ÀÖ½À´Ï´Ù.
<div class="cycle-slideshow"
data-cycle-fx="scrollHorz"
data-cycle-pause-on-hover="true"
data-cycle-speed="200">
<img src="/images/img1.jpg">
<img src="/images/img2.jpg">
<img src="/images/img3.jpg">
<img src="/images/img4.jpg">
</div>
¾Æ·¡Ã³·³ ´Ù¾çÇÑ ¿É¼ÇÀÌ Á¸Àç ÇÕ´Ï´Ù.
<style>
.topCard {border:1px solid #EEE;padding:5px;width:273px;height:100px;}
.topCard .slide {margin:10px;border:1px solid red;}
.topCard .per-slide-template span {border:1px solid red;padding:10px;}
</style>
<!--
fade
scrollHorz
carousel
-->
<div class="topCard cycle-slideshow"
data-cycle-fx="carousel"
data-cycle-timeout="3000"
data-cycle-speed="1000"
data-cycle-slides="> .slide"
data-cycle-carousel-visible="1"
data-cycle-carousel-vertical="false"
data-cycle-log="false"
data-cycle-pause-on-hover="true"
data-cycle-pager="#per-slide-template">
<div class="slide" data-cycle-pager-template="<span>Sprint1</span>">
<a href="#" ><img src="img_top_ad03.gif" /></a>
</div>
<div class="slide" data-cycle-pager-template="<span>Spring2</span>">
<a href="#" ><img src="img_top_ad02.gif" /></a>
</div>
<div class="slide" data-cycle-pager-template="<span>Spring3</span>">
<a href="#" ><img src="img_top_ad01.gif" /></a>
</div>
<div class="slide" data-cycle-pager-template="<span>Spring4</span>">
<a href="#" ><img src="img_top_ad02.gif" /></a>
</div>
</div>
<br><br>
<div id=per-slide-template style=""></div>
<br><br>
<div id="buttons">
<span data-cycle-cmd="prev">Prev</span>
<span data-cycle-cmd="next">Next</span>
<span data-cycle-cmd="pause">Pause</span>
<span data-cycle-cmd="resume">Resume</span>
</div>
½½¶óÀÌµå ¼î ³ôÀÌ ÀÚµ¿Á¶Àý¹æ¹ý
<div class="topCard cycle-slideshow"
data-cycle-fx="carousel"
data-cycle-timeout="3000"
data-cycle-speed="1000"
data-cycle-slides="> .slide"
data-cycle-carousel-visible="1"
data-cycle-carousel-vertical="false"
data-cycle-log="false"
data-cycle-pause-on-hover="true"
data-cycle-pager="#per-slide-template"
data-cycle-auto-height="3:2"
>
</div>
data-cycle-auto-height="3:2" ¿É¼ÇÀ» Ãß°¡ÇØ ÁÖ¸é µË´Ï´Ù. ºñÀ²´ë·Î Ç¥½Ã°¡ µË´Ï´Ù.
½½¶óÀ̵å¼î¸¦ ½ÃÀÛÇÒ¶§ ¸ØÃçÀÖ´Â ¼öµ¿ÀÎ »óÅ (paused) ·Î ½ÃÀÛÇÏ°í ½ÍÀ» °æ¿ì
data-cycle-paused="true"
¿É¼ÇÀ» Ãß°¡ÇÏ¸é µË´Ï´Ù.