·¹À̾îÀÇ Å¬¸³°ú ½ºÀ¬¿¡ ´ëÇØ ¾Ë¾Æº»´Ù. ¼³¸íº¸´Ù´Â Á÷Á¢ µ¥¸ð¸¦ º¸°í ¾î¶»°Ô µ¿ÀÛÇÏ´ÂÁö¸¦
¾Ë¾Æº¸°í °¢°¢ÀÇ »ç¿ë¹æ¹ýÀ» ÀÍÇôº¸ÀÚ. ÀÌ°ÍÀº ¸¹Àº °÷¿¡ ÀÀ¿ëÀÌ °¡´ÉÇÏ´Ù.
HTML
Example |
<html>
<head>
<title>Hellow Homepage - DHTML </title>
<script language="JavaScript1.2" src="cbdhtml.js">
</script>
</head>
<body bgcolor=white>
<script language="JavaScript1.2">
var test="test";
content='<img src=../img/title_dhtml.gif border=0>';
createLayer(test,5,5,468,60,0,content);
clipLayer(test,0,0,0,60);
showLayer(test);
swipeLayer(test,0,0,468,60,200);
</script>
</body>
</html> |
|
|
¼³¸í |
Àû¿ë°á°ú¿¡ ³ªÅ¸³ª´Â È¿°ú¸¦
¾ò±â À§Çؼ´Â ´ÙÀ½ÀÇ µÎ°³ÀÇ ÇÔ¼ö »ç¿ë¹ýÀ» ¾Ë¾ß°Ú´Ù. ¸ÕÀú ÇÔ¼ö ºÎÅÍ ¾Ë¾Æº¸ÀÚ.
clipeLayer(name,clipleft,cliptop,clipright,clipbottom);
swipeLayer(name,clipleft,cliptop,clipright,clipbottom,speed);
Àû¿ë°á°ú¿¡¼ º¸¿©Áö´Â ´ë·Î óÀ½¿¡´Â ½ºÀ¬È¿°ú¸¦ ¾ò±â À§ÇØ ·¹À̾ Ŭ¸³ÇÑ´Ù. Áï ½ºÀ¬È¿°ú¸¦
º¸¿©ÁÖ±â À§ÇÑ ½ÃÀÛÁ¡À̶ó »ý°¢Çϸé ÀÌÇØ°¡ ºü¸¦°ÍÀÌ´Ù. ±×¸®°í ½ºÀ¬È¿°ú¸¦ Á÷Á¢ ºÎ¿©ÇÏ´Â
swipeLayer() ÇÔ¼ö¿¡ ½ºÀ¬ÀÇ ¼Óµµ¿Í ½ºÀ¬ÀÇ ³¡Á¡À» Áö½ÃÇÏ¸é µÈ´Ù. Á¤¸®Çغ¸¸é
name : createLayer() ·Î ÀÌ¹Ì ·¹À̾ ¸¸µé¶§ ºÎ¿©ÇÑ ·¹À̾î À̸§ÀÌ´Ù.
clipleft : ·¹À̾î Ŭ¸³ ¿ÞÂÊ(left)
cliptop : ·¹À̾î Ŭ¸³ À§ÂÊ(top)
clipright: clipleft¸¦ ±âÁØÀ¸·Î ¿À¸¥ÂʹæÇâÀ¸·ÎÀÇ À§Ä¡(right)
clipbottom : cliptopÀ» ±âÁØÀ¸·Î ¾Æ·¡¹æÇâÀ¸·ÎÀÇ À§Ä¡(bottom)
À§ÀÇ °á°úº¸±â¿¡´Â ´ÙÀ½°ú °°ÀÌ ÀÔ·ÂÇÏ¿´´Ù.
clipeLayer(test,0,0,0,60);
¼³¸íÇϸé left´Â 0 , topÀº 0Àº ·¹À̾î¾È¿¡¼ (0,0) À» ÀǹÌÇÑ´Ù. right´Â
0 ¿¡¼ 0À̶õ ¼ýÀÚ´Â left¸¦ ±âÁØÀ¸·Î right ÂÊÀ¸·Î 0 ¸¸Å ¶³¾îÁø À§Ä¡¸¦ ¸»ÇÑ´Ù.
bottomÀº 60 ¿¡¼ 60ÀÇ Àǹ̴ topÀ» ±âÁØÀ¸·Î ¾Æ·¡(bottom)¹æÇâÀ¸·Î 60
¸¸Å ¶³¾îÁø À§Ä¡¸¦ ¸»ÇÑ´Ù.
swipLayer(test,0,0,468,60,200);
Áï ½ºÇÇ´Â 200À̶õ À̾߱â°í (0,0,468,60)À̶õ ½ºÀ¬ÀÇ ³¡Á¡À» ÁöÁ¤ÇÑ´Ù.
ÀÌ·¸°Ô ÁöÁ¤Çϸé clipLayer¿¡¼ ÁöÁ¤ÇÑ (0,0,0,60)ÀÇ ½ÃÀÛÁ¡¿¡¼ ½ºÀ¬À» ½ÃÀÛÇÏ¿©
³¡Á¡À¸·Î ½ºÀ¬ÀÌ µÈ´Ù´Â À̾߱â´Ù.
ÁÖÀÇÇÒÁ¡Àº ¹Ýµå½Ã µÎ°³ÀÇ ÇÔ¼ö°¡ °°ÀÌ ¾²¿©¾ß ÇÑ´Ù´Â °ÍÀÌ´Ù. |
|
|
|