26/03/12

Tutorial - Efeito de arco-íris nos links


( blog garota do olhar sincero )


Oii fofuscos :)

Hoje vou ensinar um tutorial que quase todos os blogs tem....o efeito de arco-íris nos links :)
P.S.- Não tentes pelo safari, porque não aparece barra de pesquisa nenhuma :(

Vai ao html, marca a opção "expandir modelos de widgets", pressiona as teclas ctrl + f e procura por  </head>

Agora cola o seguinte código antes da tag :










<script type='text/javascript'>

//<![CDATA[var rate = 20;if undefineddocument.getElementById)window.onerror=new Functionundefined"return true")var objActive; // The object which event occured invar act = 0; // Flag during the actionvar elmH = 0; // Huevar elmS = 128; // Saturationvar elmV = 255; // Valuevar clrOrg; // A color before the changevar TimerID; // Timer IDif undefineddocument.all) {document.onmouseover = doRainbowAnchor;document.onmouseout = stopRainbowAnchor;}else if undefineddocument.getElementById) {document.captureEventsundefinedEvent.MOUSEOVER | Event.MOUSEOUT);document.onmouseover = Mozilla_doRainbowAnchor;document.onmouseout = Mozilla_stopRainbowAnchor;}function doRainbowundefinedobj){if undefinedact == 0) {act = 1;if undefinedobj)objActive = obj;elseobjActive = event.srcElement;clrOrg = objActive.style.color;TimerID = setIntervalundefined"ChangeColorundefined)",100);}}function stopRainbowundefined){if undefinedact) {objActive.style.color = clrOrg;clearIntervalundefinedTimerID);act = 0;}}function doRainbowAnchorundefined){if undefinedact == 0) {var obj = event.srcElement;while undefinedobj.tagName != 'A' && obj.tagName != 'BODY') {obj = obj.parentElement;if undefinedobj.tagName == 'A' || obj.tagName == 'BODY')break;}if undefinedobj.tagName == 'A' && obj.href != '') {objActive = obj;act = 1;clrOrg = objActive.style.color;TimerID = setIntervalundefined"ChangeColorundefined)",100);}}}function stopRainbowAnchorundefined){if undefinedact) {if undefinedobjActive.tagName == 'A') {objActive.style.color = clrOrg;clearIntervalundefinedTimerID);act = 0;}}}function Mozilla_doRainbowAnchorundefinede){if undefinedact == 0) {obj = e.target;while undefinedobj.nodeName != 'A' && obj.nodeName != 'BODY') {obj = obj.parentNode;if undefinedobj.nodeName == 'A' || obj.nodeName == 'BODY')break;}if undefinedobj.nodeName == 'A' && obj.href != '') {objActive = obj;act = 1;clrOrg = obj.style.color;TimerID = setIntervalundefined"ChangeColorundefined)",100);}}}function Mozilla_stopRainbowAnchorundefinede){if undefinedact) {if undefinedobjActive.nodeName == 'A') {objActive.style.color = clrOrg;clearIntervalundefinedTimerID);act = 0;}}}function ChangeColorundefined){objActive.style.color = makeColorundefined);}function makeColorundefined){// Don't you think Color Gamut to look like Rainbow?// HSVtoRGBif undefinedelmS == 0) {elmR = elmV; elmG = elmV; elmB = elmV;}else {t1 = elmV;t2 = undefined255 - elmS) * elmV / 255;t3 = elmH % 60;t3 = undefinedt1 - t2) * t3 / 60;if undefinedelmH < 60) {elmR = t1; elmB = t2; elmG = t2 + t3;}else if undefinedelmH < 120) {elmG = t1; elmB = t2; elmR = t1 - t3;}else if undefinedelmH < 180) {elmG = t1; elmR = t2; elmB = t2 + t3;}else if undefinedelmH < 240) {elmB = t1; elmR = t2; elmG = t1 - t3;}else if undefinedelmH < 300) {elmB = t1; elmG = t2; elmR = t2 + t3;}else if undefinedelmH < 360) {elmR = t1; elmG = t2; elmB = t1 - t3;}else {elmR = 0; elmG = 0; elmB = 0;}}elmR = Math.floorundefinedelmR).toStringundefined16);elmG = Math.floorundefinedelmG).toStringundefined16);elmB = Math.floorundefinedelmB).toStringundefined16);if undefinedelmR.length == 1) elmR = "0" + elmR;if undefinedelmG.length == 1) elmG = "0" + elmG;if undefinedelmB.length == 1) elmB = "0" + elmB;elmH = elmH + rate;if undefinedelmH >= 360)elmH = 0;return '#' + elmR + elmG + elmB;}//]]></script>




E pronto :) Se tiver tudo certo salva :)

8 comentários:

  1. Gostei do Tuto !
    http://sweetdrens.blogspot.com

    ResponderEliminar
  2. Adorei o blog e o tuto também c: Seguindo, segue de volta ???
    http://princesswithallstar.blogspot.com.br/

    ResponderEliminar
  3. Oii , obg poor visitar aqui todos s dias flor s2 bezuuu *-*

    garotamilkshake.blogspot.com

    ResponderEliminar
  4. Esse tutorial é mtt legal nér? euu ja fiz ele uma vez.
    nãao deixe de passar la no meu blog & comentar o ultimo post.
    http://paradateen1.blogspot.com.br/ novidades & noticias sempre *.~
    beijos,otima semana ...
    att, Luana oliveira

    ResponderEliminar
  5. Como é que fica??
    Gostava de saber, se possível, antes de pôr no meu blog.
    Se não der tudo bem...
    Bjs,
    RITA

    pugsgeneration.blogspot.pt

    ResponderEliminar

-Não coloques o link do teu blog para ele não ser excluído. Retribuo mesmo que deixes só "Cat Girl".

-Comentários do género "Seguindo, segue de volta", "Adoro seu blog", "Novo concurso..." não serão respondidos.

-Fala alguma coisa sobre o post, senão não retribuo.

-Aceito críticas construtivas, nada de palavrões ou coisas do género.

Beatriz


Layout by Beatriz D. ~ Cat Girl | Proibido cópias