ȸ¿ø°¡ÀԡžÆÀ̵ð/ºñ¹øã±â
ȨÀ¸·Î


ÀÚ¹Ù½ºÅ©¸³Æ® ¿¬½À ¿¹Á¦ - ·£´ýÇÏ°Ô ¿òÁ÷ÀÌ´Â ÅؽºÆ® ¸¸µé±â
7³â Àü
<script>
//·£´ýÇÑ Á¤¼ö »ý¼º
function nextRandomInteger(limit) {
        return Math.round(Math.random() * limit);
}

//·£´ýÇÑ ¾ËÆĺª ¸®ÅÏ
var alphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
function randomAlphabet(){
        return alphabet.charAt(nextRandomInteger(25));        
}

//¾ç¼ö¿Í À½¼öÀÇ ·£´ýÇÑ ¼Óµµ »ý¼º
function randomSpeed(maxSpeed){
        return Math.random() * maxSpeed - Math.random() * maxSpeed;
}
</script>

<script>
//Moving TextÀÇ »ý¼ºÀÚ ÇÔ¼ö
var canvasWidth = 700;
var canvasHeight = 400;

function MovingText(){
        this.x = nextRandomInteger(canvasWidth);
        this.y = nextRandomInteger(canvasHeight);
        this.vx = randomSpeed(10);
        this.vy = randomSpeed(10);
        
        //¹®¼­°´Ã¼ »ý¼º
        this.body = document.createElement('h1');
        this.body.innerHTML = randomAlphabet();
        this.body.style.position = 'absolute';
        
        //¹®¼­°´Ã¼¸¦ document.body¿¡ Ãß°¡
        document.body.appendChild(this.body);
}

MovingText.prototype.move = function(){
        //¹üÀ§°Ë»ç
        if(this.x < 0 || this.x > canvasWidth) {this.vx *= -1;}
        if(this.y < 0 || this.y > canvasHeight) {this.vy *= -1;}
        
        //À̵¿
        this.x += this.vx;
        this.y += this.vy;
        
        //È­¸é¿¡ À̵¿Ç¥½Ã
        this.body.style.left = this.x + 'px';
        this.body.style.top = this.y + 'px';
};
</script>

<script>
window.onload = function(){
        var movingTexts = [];
        
        for(var i = 0; i<100; i++){
                movingTexts.push(new MovingText());
        }
        
        setInterval(function(){
                for(var i in movingTexts){
                        movingTexts[i].move();
                }
        }, 1000/60);
};
</script>
ÃßõÃßõ : 255 Ãßõ ¸ñ·Ï
¹øÈ£ Á¦¸ñ
1,282
[JqueryMobile] - È­¸éÀÇ °¡·Î, ¼¼·Î »çÀÌÁî ±¸ÇÏ´Â ¹æ¹ý
1,281
jquery div ±âº» ³ÐÀÌ, ³ôÀÌ °è»ê ¹× padding, border Æ÷ÇÔ Çϱâ
1,280
ƯÁ¤ ÆäÀÌÁö Á¾·á½Ã È®ÀÎ °æ°íâ Ãâ·Â
1,279
jquery ¸¶¿ì½º ¿À¸¥ÂÊ ¹öÆ° Ŭ¸¯ ±ÝÁö (¿ìŬ¸¯ Á¦ÇÑ)
1,278
Á¤±Ô½Ä ƯÁ¤±¸°£ÀÇ ³»¿ë¸¸ °¡Á®¿À±â
1,277
°ýÈ£() ¾ÈÀÇ ³»¿ë¸¸ ÃßÃâ
1,276
Á¤±Ô Ç¥Çö½Ä(Regular Expression)
1,275
PHP¿¡¼­ À¯¿ëÇÏ°Ô ¾²ÀÌ´Â ¹®ÀÚ¿­ ó¸® ÇÔ¼ö
1,274
[PHP] Á¤±ÔÇ¥Çö½ÄÀ» ÀÌ¿ëÇÑ Æ¯¼ö¹®ÀÚ ¼ýÀÚÁ¦°Å
1,273
PHP ȯ°æº¯¼ö Á¤¸®
1,272
PHP Ŭ·¡½º »ç¿ë¹æ¹ý Á¤¸®
1,271
php¿¡¼­ º¯¼ö°ªÀ» ÇÔ¼öÀ̸§À¸·Î »ç¿ëÇÏ¿© ÇÔ¼ö ½ÇÇàÇÏ´Â ¹æ¹ý
1,270
repaceÀ» ÀÌ¿ëÇÑ Á¤±Ô½Ä ¸ðÀ½
1,269
HTML ÆäÀÌÁö¿¡¼­ ÁÖ¼®À» Á¦°ÅÇÏ´Â Á¤±Ô½Ä(PHP)
1,268
PHP - ¹®ÀÚ¿­¿¡¼­ HTMLÅÂ±× Á¦°Å + Á¤±Ô½Ä
1,267
PHP Á¤±Ô½ÄÀ» È°¿ëÇÑ ÅÂ±× ¹× ƯÁ¤ ¹®ÀÚ¿­ Á¦°Å ¹× ÃßÃâ ¹æ¹ý
1,266
PHP Á¤±Ô½Ä Á¤¸®
1,265
Á¤±Ô½Ä ÆÐÅÏ ¹®¹ý
1,264
[Á¤±ÔÇ¥Çö½Ä]Á¤±ÔÇ¥Çö½Ä Á¤¸®
1,263
[php]¿øÇÏ´Â ´Ü¾î¸¦ ã¾Æ¼­ ġȯ ÇØÁÖ´Â ¹æ¹ý preg_replace
1,262
jQuery ÇÙ½É - ³ëµå ´Ù·ç±â
1,261
jQuery show() / hide() / toggle() »ç¿ë¹ý
1,260
[jQuery] readyÀÇ »ç¿ë¹ý
1,259
[jQuery] À§Ä¡±â¹Ý Selector
1,258
[jQuery] css selector
1,257
document.getElementByTagName()¸¦ jQuery·Î ¹Ù²ãº¸ÀÚ.
1,256
getElementsByClassName¸¦ jQuery·Î ¹Ù²ãº¸ÀÚ.
1,255
getElementById¸¦ jQuery·Î ¹Ù²ãº¸ÀÚ
ÀÚ¹Ù½ºÅ©¸³Æ® ¿¬½À ¿¹Á¦ - ·£´ýÇÏ°Ô ¿òÁ÷ÀÌ´Â ÅؽºÆ® ¸¸µé±â
1,253
jQuery Mobile¿¡¼­ À¯¿ëÇÑ ÄÚµå 10°¡Áö
¸ñ·Ï
¹ÂÁ÷Æ®·ÎÆ® ºÎ»ê±¤¿ª½Ã ºÎ»êÁø±¸ °¡¾ßµ¿ ¤Ó °³ÀÎÁ¤º¸Ãë±Þ¹æħ
Copyright ¨Ï musictrot All rights reserved.