Diendandip

Bạn có muốn phản ứng với tin nhắn này? Vui lòng đăng ký diễn đàn trong một vài cú nhấp chuột hoặc đăng nhập để tiếp tục.
Diendandip

Latest topics

» TEAM THIÊN TÀI VÔ ĐỊCH GIẢI ĐẤU CLAN ĐẦU TIÊN
by rename Fri Dec 12, 2014 12:25 am

» [CPVM] Like Fanpage ngay, nhận quà liền tay!
by rename Fri Dec 12, 2014 12:23 am

» Xạ thủ Truy Kích Bắc – Nam: Bên tám lạng người nửa cân
by rename Wed Dec 10, 2014 11:54 pm

» Teen chia sẻ bí quyết chinh phục đỉnh vũ môn
by rename Wed Dec 10, 2014 11:51 pm

» [Chinh Phục Vũ Môn] Hoạt động hàng ngày, chăm chỉ nhận thưởng
by rename Wed Dec 10, 2014 11:48 pm

» Truy Kích - những vấn đề cần giải quyết để thành ông hoàng mới của MMOFPS Việt
by rename Wed Dec 10, 2014 4:52 am

» Chinh Phục Vũ Môn đi tiên phong cho thế hệ game Cross-Platform Việt Nam
by rename Wed Dec 10, 2014 4:47 am

» Game đấu trí Chinh Phục Vũ Môn phiên bản mới có gì hot
by rename Wed Dec 10, 2014 4:43 am

» Ra mắt thành công, clan Truy Kích mọc lên như nấm
by rename Mon Dec 08, 2014 7:34 pm

» Tích xúc xắc, Vui từng khoảnh khắc!
by rename Mon Dec 08, 2014 7:30 pm

» Chinh Phục Vũ Môn-Hướng Dẫn Tân Thủ
by rename Mon Dec 08, 2014 7:26 pm

» CPVM toàn quốc lần thứ nhất 2014 - 2015 chính thức được gia hạn
by rename Mon Dec 08, 2014 3:02 am

» Bắc Giang tổ chức hội nghị tập huấn, triển khai cuộc thi Chinh Phục Vũ Môn
by rename Mon Dec 08, 2014 2:52 am

» [Chinh Phục Vũ Môn] Tham gia Tích xúc xắc, Vui từng khoảnh khắc!
by rename Sun Dec 07, 2014 2:42 am

» Chinh phục Vũ Môn – Câu chuyện Egame viết cho cộng đồng
by rename Sun Dec 07, 2014 2:37 am

» [TRUY KÍCH] CHÙM SỰ KIỆN CHÀO MỪNG PHIÊN BẢN CHÍNH THỨC
by rename Fri Dec 05, 2014 7:12 pm

» Chinh Phục Vũ Môn Mobile ghi điểm nhờ tính giáo dục cao
by rename Fri Dec 05, 2014 7:04 pm


    [Share] CODE CHỮ CHẠY THEO CHUỘT

    Poll

    Bạn có thích không?

    Tonny Cát
    Tonny Cát
    Admin


    Điểm : 3974
    Bài viết : 89
    Like : 15
    Forum,web : http://www.diendandip.info/u186

    [Share] CODE CHỮ CHẠY THEO CHUỘT Empty [Share] CODE CHỮ CHẠY THEO CHUỘT

    Bài gửi  Tonny Cát Mon Nov 18, 2013 11:04 pm



     (Diễn Đàn D.Í.P)
    /* Circling text trail- Tim Tilton
     Website: [You must be registered and logged in to see this link.]
     Visit: [You must be registered and logged in to see this link.] for Original Source and tons of scripts
     Modified Here for more flexibility and modern browser support
     Modifications as first seen in [You must be registered and logged in to see this link.]
     username:jscheuer1 - This notice must remain for legal use
     */
    ;(function(){
    // Your message here (QUOTED STRING)
    var msg = " Diễn Đàn D.Í.P - CongdongD.Í.P  ";
    /* THE REST OF THE EDITABLE VALUES BELOW ARE ALL UNQUOTED NUMBERS */
    // Set font's style size for calculating dimensions
    // Set to number of desired pixels font size (decimal and negative numbers not allowed)
    var size = 20;
    // Set both to 1 for plain circle, set one of them to 2 for oval
    // Other numbers & decimals can have interesting effects, keep these low (0 to 3)
    var circleY = 0.75; var circleX = 2;
    // The larger this divisor, the smaller the spaces between letters
    // (decimals allowed, not negative numbers)
    var letter_spacing = 5;
    // The larger this multiplier, the bigger the circle/oval
    // (decimals allowed, not negative numbers, some rounding is applied)
    var diameter = 10;
    // Rotation speed, set it negative if you want it to spin clockwise (decimals allowed)
    var rotation = 0.4;
    // This is not the rotation speed, its the reaction speed, keep low!
    // Set this to 1 or a decimal less than one (decimals allowed, not negative numbers)
    var speed = 0.3;
    ////////////////////// Stop Editing //////////////////////
    if (!window.addEventListener && !window.attachEvent || !document.createElement) return;
    msg = msg.split('');
    var n = msg.length - 1, a = Math.round(size * diameter * 0.208333), currStep = 20,
    ymouse = a * circleY + 20, xmouse = a * circleX + 20, y = [], x = [], Y = [], X = [],
    o = document.createElement('div'), oi = document.createElement('div'),
    b = document.compatMode && document.compatMode != "BackCompat"? document.documentElement : document.body,
    mouse = function(e){
    e = e || window.event;
    ymouse = !isNaN(e.pageY)? e.pageY : e.clientY; // y-position
    xmouse = !isNaN(e.pageX)? e.pageX : e.clientX; // x-position
    },
    makecircle = function(){ // rotation/positioning
    if(init.nopy){
     o.style.top = (b || document.body).scrollTop + 'px';
     o.style.left = (b || document.body).scrollLeft + 'px';
    };
    currStep -= rotation;
    for (var d, i = n; i > -1; --i){ // makes the circle
     d = document.getElementById('iemsg' + i).style;
     d.top = Math.round(y[i] + a * Math.sin((currStep + i) / letter_spacing) * circleY - 15) + 'px';
     d.left = Math.round(x[i] + a * Math.cos((currStep + i) / letter_spacing) * circleX) + 'px';
    };
    },
    drag = function(){ // makes the resistance
    y[0] = Y[0] += (ymouse - Y[0]) * speed;
    x[0] = X[0] += (xmouse - 20 - X[0]) * speed;
    for (var i = n; i > 0; --i){
     y[i] = Y[i] += (y[i-1] - Y[i]) * speed;
     x[i] = X[i] += (x[i-1] - X[i]) * speed;
    };
    makecircle();
    },
    init = function(){ // appends message divs, & sets initial values for positioning arrays
    if(!isNaN(window.pageYOffset)){
     ymouse += window.pageYOffset;
     xmouse += window.pageXOffset;
    } else init.nopy = true;
    for (var d, i = n; i > -1; --i){
     d = document.createElement('div'); d.id = 'iemsg' + i;
     d.style.height = d.style.width = a + 'px';
     d.appendChild(document.createTextNode(msg[i]));
     oi.appendChild(d); y[i] = x[i] = Y[i] = X[i] = 0;
    };
    o.appendChild(oi); document.body.appendChild(o);
    setInterval(drag, 25);
    },
    ascroll = function(){
    ymouse += window.pageYOffset;
    xmouse += window.pageXOffset;
    window.removeEventListener('scroll', ascroll, false);
    };
    o.id = 'outerCircleText'; o.style.fontSize = size + 'px';
    if (window.addEventListener){
    window.addEventListener('load', init, false);
    document.addEventListener('mouseover', mouse, false);
    document.addEventListener('mousemove', mouse, false);
     if (/Apple/.test(navigator.vendor))
     window.addEventListener('scroll', ascroll, false);
    }
    else if (window.attachEvent){
    window.attachEvent('onload', init);
    document.attachEvent('onmousemove', mouse);
    };
    })();



    Được sửa bởi Tonny Cát ngày Wed Nov 20, 2013 12:19 am; sửa lần 1.
    Tonny Cát
    Tonny Cát
    Admin


    Điểm : 3974
    Bài viết : 89
    Like : 15
    Forum,web : http://www.diendandip.info/u186

    [Share] CODE CHỮ CHẠY THEO CHUỘT Empty Re: [Share] CODE CHỮ CHẠY THEO CHUỘT

    Bài gửi  Tonny Cát Mon Nov 18, 2013 11:05 pm

    Các bạn nên dùng code dưới đây đơn giản hơn nè ,,,, Chèn vào đâu cũng được


    Code:
     

    var text=' Diễn Đàn D.Í.P - Cộng đồng D.Í.P ';

    var delay=22;
    var Xoff=0;
    var Yoff=10;
    var txtw=8;
    var beghtml='';
    var endhtml='
    ';
    ns4 = (navigator.appName.indexOf("Netscape")>=0 && document.layers)? true : false;
    ie4 = (document.all && !document.getElementById)? true : false;
    ie5 = (document.all && document.getElementById)? true : false;
    ns6 = (document.getElementById && navigator.appName.indexOf("Netscape")>=0 )? true: false;
    var txtA=new Array();
    text=text.split('');
    var x1=0;
    var y1=-1000;
    var t='';
    for(i=1;i<=text.length;i++){
    t+=(ns4)? '' : '
    ';
    t+=beghtml+text[i-1]+endhtml;
    t+=(ns4)? '' : '
    ';
    }
    document.write(t);
    function moveid(id,x,y){
    if(ns4)id.moveTo(x,y);
    else{
    id.style.left=x+'px';
    id.style.top=y+'px';
    }}
    function animate(evt){
    x1=Xoff+((ie4||ie5)?event.clientX+document.body.scrollLeft:evt.pageX);
    y1=Yoff+((ie4||ie5)?event.clientY+document.body.scrollTop:evt.pageY);
    }
    function getidleft(id){
    if(ns4)return id.left;
    else return parseInt(id.style.left);
    }
    function getidtop(id){
    if(ns4)return id.top;
    else return parseInt(id.style.top);
    }
    function getwindowwidth(){
    if(ie4||ie5)return document.body.clientWidth+document.body.scrollLeft;
    else return window.innerWidth+pageXOffset;
    }
    function movetxts(){
    for(i=text.length;i>1;i=i-1){
    if(getidleft(txtA[i-1])+txtw*2>=getwindowwidth()){
    moveid(txtA[i-1],0,-1000);
    moveid(txtA[i],0,-1000);
    }else moveid(txtA[i], getidleft(txtA[i-1])+txtw, getidtop(txtA[i-1]));
    }
    moveid(txtA[1],x1,y1);
    }
    window.onload=function(){
    for(i=1;i<=text.length;i++)txtA[i]=(ns4)?document.layers['txt'+i]:(ie4)?document.all['txt'+i]:document.getElementById('txt'+i);
    if(ns4)document.captureEvents(Event.MOUSEMOVE);
    document.onmousemove=animate;
    setInterval('movetxts()',delay);
    }

      Hôm nay: Fri Sep 20, 2024 11:15 am

      Scroll To Bottom
      Tắt