Скрипт прокрутки текста

Discussion in 'PHP' started by Graf I, 18 Apr 2008.

  1. Graf I

    Graf I Banned

    Joined:
    30 Jan 2008
    Messages:
    47
    Likes Received:
    1
    Reputations:
    0
    Вродебы он на java, напешите кто знает...
     
  2. banned

    banned Banned

    Joined:
    20 Nov 2006
    Messages:
    3,324
    Likes Received:
    1,194
    Reputations:
    252
    PHP:
    <html>
    <
    body>

    <
    script language="JavaScript1.2">


    //Specify the marquee's width (in pixels)

    var marqueewidth=150

    //Specify the marquee's height

    var marqueeheight=150

    //Specify the marquee's scroll speed (larger is faster)

    var speed=2

    //Specify the marquee contents

    var marqueecontents='<font face="Arial"><strong><big>Скоролинг текста со <a href="http://">ССЫЛКАМИ</a> Можно использовать на главной странице сайта <a href="http://">сайта.</a></big></strong></font>'



    if (document.all)

    document.write('<marquee direction="up" scrollAmount='+speed+' style="width:'+marqueewidth+';height:'+marqueeheight+'">'+marqueecontents+'</marquee>')



    function 
    regenerate(){

    window.location.reload()

    }

    function 
    regenerate2(){

    if (
    document.layers){

    setTimeout("window.onresize=regenerate",450)

    intializemarquee()

    }

    }



    function 
    intializemarquee(){

    document.cmarquee01.document.cmarquee02.document.write(marqueecontents)

    document.cmarquee01.document.cmarquee02.document.close()

    thelength=document.cmarquee01.document.cmarquee02.document.height

    scrollit
    ()

    }



    function 
    scrollit(){

    if (
    document.cmarquee01.document.cmarquee02.top>=thelength*(-1)){

    document.cmarquee01.document.cmarquee02.top-=speed

    setTimeout
    ("scrollit()",100)

    }

    else{

    document.cmarquee01.document.cmarquee02.top=marqueeheight

    scrollit
    ()

    }

    }



    window.onload=regenerate2

    </script>





    <ilayer width=&{marqueewidth}; height=&{marqueeheight}; name="cmarquee01">

    <layer name="cmarquee02" width=&{marqueewidth}; height=&{marqueeheight};></layer>

    </ilayer>
    </CENTER>
    </body>
    </html>
     
  3. banned

    banned Banned

    Joined:
    20 Nov 2006
    Messages:
    3,324
    Likes Received:
    1,194
    Reputations:
    252
    http://www.google.ru/search?hl=ru&q=%D1%81%D0%BA%D1%80%D0%B8%D0%BF%D1%82+%D0%BF%D1%80%D0%BE%D0%BA%D1%80%D1%83%D1%82%D0%BA%D0%B8+%D1%82%D0%B5%D0%BA%D1%81%D1%82%D0%B0&lr=&aq=0&oq=%D0%A1%D0%BA%D1%80%D0%B8%D0%BF%D1%82+%D0%BF%D1%80%D0%BE%D0%BA%D1%80%D1%83%D1%82%D0%BA%D0%B8+%D1%82%D0%B5%D0%BA%D1%81%D1%82%D0%B0
     
  4. Graf I

    Graf I Banned

    Joined:
    30 Jan 2008
    Messages:
    47
    Likes Received:
    1
    Reputations:
    0
    мне надо в html код вставить в таблицу
     
  5. mff

    mff Elder - Старейшина

    Joined:
    12 Mar 2008
    Messages:
    2,074
    Likes Received:
    701
    Reputations:
    227
    Очень просто!

    <div style="width:700; height:100px; overflow:auto; border:solid 2px #E3D9D0; background-color:#FFFFFF; scrollbar-face-color:#675547; scrollbar-shadow-color:#e3d9d0; scrollbar-highlight-color:#e3d9d0; scrollbar-3dlight-color:#e3d9d0; scrollbar-darkshadow-color:#e3d9d0; scrollbar-track-color:#e3d9d0; scrollbar-arrow-color:#ffffff;"></div>

    Единственный косячек этого стиля, не меняются цвета прокрутки в Mozilla, ну и х*й с ней! ;)
     
  6. GreenBear

    GreenBear наркоман с медалью

    Joined:
    7 May 2005
    Messages:
    2,548
    Likes Received:
    1,397
    Reputations:
    612
    а еще что надо? ты давай нам задания, нам все равно всем делать нечего - поработаем и подумаем за тебя.
     
    1 person likes this.
  7. mff

    mff Elder - Старейшина

    Joined:
    12 Mar 2008
    Messages:
    2,074
    Likes Received:
    701
    Reputations:
    227
    GreenBear - точно подметил!