여러글자들중 하나를 누르고 있으면 부드럽게 커지는 메뉴 > script

본문 바로가기
사이트 내 전체검색

script

여러글자들중 하나를 누르고 있으면 부드럽게 커지는 메뉴

페이지 정보

작성자 서방님 댓글 0건 조회 180회 작성일 07-08-08 16:08

본문

<html>
<head>
<title>tagsoup - Interactive DHTML art-demos</title>
<meta name="Author" content="Gerard Ferrandez at http://www.dhteumeuleu.com">
<style type="text/css">
    body {cursor:crosshair; background:#fff; margin:10; padding:0; position:absolute; overflow: hidden; left:0; top:0; width:100%; height:100%;}
    .over {background:#ccc;color:#000;cursor:pointer}
    .out {background:transparent;color:#000;}
    .tagsoup {color:#000;font-family:verdana;text-align:left;border:#888 dashed 1px;background:#fff}
</style>

<script type="text/javascript"><!--
// ================================================
// script: Gerard Ferrandez - Ge-1-doot - MAY 2005
// http://www.dhteumeuleu.com
// ================================================

document.onselectstart = new Function("return false");
document.onmousedown = new Function("return false");

T = "javascript web reference software development design css programming dhtml html firefox webdev dom tools blog flash fonts computer tech windows computing hacking java algorithms processing language environment program images animation sound development php apache regexp tips news journal code computers virus security scripts parsing win32  bytecode DOM interactive Menu organization webdesign ajax xmlhttprequest technology comprehension language software xhtml rss xml wiki optimization delicious demo dragdrop browsers standards code lifehacks tutorial howto".split(" ");

var object = new Array();
var z = false;

function pos(o, fs, s){
    o.style.fontSize = fs;
    o.style.zIndex = 10000 - fs;
    l = parseInt(o.style.left);
    l += s * (o.innerHTML.length * o.innerHTML.length) * fs / 400;
    o.style.left = l;
    t = parseInt(o.style.top);
    t += s * fs / 15;
    o.style.top = t;
}

function zoom(k){
    O = object[k];
    fs = Math.round(parseInt(O.style.fontSize) * 1.1 + 1);
    if(fs < 1200 && z){
        pos(O, fs, -1);
        o = "";
        s = 0;
        for(i in object){
            if(object[i] != O){
                if(parseInt(object[i].style.fontSize) > s){
                    s = parseInt(object[i].style.fontSize);
                    o = object[i];
                }
            }
        }
        fs = Math.round(parseInt(o.style.fontSize) * .9 - 1);
        pos(o, fs, 1);
        setTimeout("zoom("+k+");", 32);
    }
}


function word(i, w){
    object[i] = obj = document.createElement("span");
    obj.style.position = "absolute";
    obj.style.left = Math.random()*600;
    obj.style.top = Math.random()*400;
    fs = w.length>2 && Math.random()>.666?Math.round(10 + Math.random() * 40):10;
    obj.style.fontSize = fs + "px";
    obj.style.zIndex = 10000 - fs;
    obj.innerHTML = w;
    obj.onmousedown = new Function("z = true;zoom(" + i + ");return true;");
    obj.onmouseup = new Function("z = false;return true;");
    obj.onmouseover = new Function("this.className = 'over'");
    obj.onmouseout = new Function("this.className = 'out'");
    document.getElementById("tagsoup").appendChild(obj);
}

onload = function() {
    for(i in T)word(i, T[i]);
}

//-->
</script>
</head>

<body>

<div style="position:absolute;left:50%;top:50%">
    <div id="tagsoup" class="tagsoup" style="position:absolute;width:600;height:400;left:-300;top:-200;overflow:hidden;">
    </div>
</div>

</body>
</html>

댓글목록

등록된 댓글이 없습니다.

Total 846건 37 페이지
게시물 검색

회원로그인

접속자집계

오늘
269
어제
617
최대
1,347
전체
173,417
Latest Crypto Fear & Greed Index

그누보드5
Copyright © 서방님.kr All rights reserved.