интересный скрипт

данный скрипт был найден в примерах дефейсов еще давно, сама идея сделать пост пришла после того как я использовал этот скрипт для поздравления друга)
Сам скрипт (неправильно  работает в опере про другие не знаю) как надо все работает в Хроме.    пример  
также к похожим статьям

делаем красивый текст летящий за курсором.  firefox-делаем красиво разнообразие жизни


и так приступим: просто замените красные пометки

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<meta name="description" content=" ./с днем рождения delm1k  "/>
<link rel="icon" href="http://i26.tinypic.com/ilknxj.gif" type="image/x-icon">
<head>
всплывающий текст 
<script language="JavaScript">alert("с днем рождения");</script>
<script language="JavaScript">alert("с днем рождения теперь можно все 18 лет ))");</script>
конец всплывающий текст 
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
отображение 
<title>-=[| можно удалить если не использовать скрипт для движения текста в названии вкладки  |]=-</title>
эти параметры я пропущу как они переводятся так они и юзаються)) (интуитивно понятно)
<style type="text/css" media="all">
html,
body {
    margin: 0;
    padding: 0;
}

#text-shadow-box {
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #444;
    font-family: Helvetica, Arial, sans-serif;
    -webkit-tap-highlight-color: rgba(0,0,0,0);
    -webkit-user-select: none;
}

#text-shadow-box #tsb-text,
#text-shadow-box #tsb-link {
    position: absolute;
    top: 40%;
    left: 0;
    width: 100%;
    height: 1em;
    margin: -0.77em 0 0 0;
    font-size: 90px;
    line-height: 1em;
    font-weight: bold;
    text-align: center;
}

#text-shadow-box #tsb-text {
    font-size: 100px;
    color: transparent;
    text-shadow: black 0px -45.2px 19px;
}

#text-shadow-box #tsb-link a {
    color: #999;
    text-decoration: none;
}

#text-shadow-box #tsb-box,
#text-shadow-box #tsb-wall {
    position: absolute;
    top: 40%;
    left: 0;
    width: 100%;
    height: 60%;
}

#text-shadow-box #tsb-box {
    -webkit-box-shadow: black 0px -45.2px 39px;
    -moz-box-shadow: black 0px -45.2px 39px;
}

#text-shadow-box #tsb-wall {
    background: #999;
}

#text-shadow-box #tsb-wall p {
    position: relative;
    font-size: 18px;
    line-height: 1.5em;
    text-align: justify;
    color: #222;
    width: 550px;
    margin: 1.5em auto;
    cursor: default;
}

#text-shadow-box #tsb-wall p a {
    color: #fff;
}

#text-shadow-box #tsb-wall p a:hover {
    text-decoration: none;
    color: #000;
    background: #fff;
}

#tsb-spot {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    pointer-events: none;
    background: -webkit-gradient(radial, center center, 0, center center, 450, from(rgba(0,0,0,0)), to(rgba(0,0,0,1)));
    background: -moz-radial-gradient(center 45deg, circle closest-side, transparent 0, black 450px);
}

.hide {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
</style>
<script>

TypingText = function(element, interval, cursor, finishedCallback) {
  if((typeof document.getElementById == "undefined") || (typeof element.innerHTML == "undefined")) {
    this.running = true;    // Never run.
    return;
  }
  this.element = element;
  this.finishedCallback = (finishedCallback ? finishedCallback : function() { return; });
  this.interval = (typeof interval == "undefined" ? 30 : interval);
  this.origText = this.element.innerHTML;
  this.unparsedOrigText = this.origText;
  this.cursor = (cursor ? cursor : "");
  this.currentText = "";
  this.currentChar = 0;
  this.element.typingText = this;
  if(this.element.id == "") this.element.id = "typingtext" + TypingText.currentIndex++;
  TypingText.all.push(this);
  this.running = false;
  this.inTag = false;
  this.tagBuffer = "";
  this.inHTMLEntity = false;
  this.HTMLEntityBuffer = "";
}
TypingText.all = new Array();
TypingText.currentIndex = 0;
TypingText.runAll = function() {
  for(var i = 0; i < TypingText.all.length; i++) TypingText.all[i].run();
}
TypingText.prototype.run = function() {
  if(this.running) return;
  if(typeof this.origText == "undefined") {
    setTimeout("document.getElementById('" + this.element.id + "').typingText.run()", this.interval);    // We haven't finished loading yet.  Have patience.
    return;
  }
  if(this.currentText == "") this.element.innerHTML = "";
//  this.origText = this.origText.replace(/<([^<])*>/, "");     // Strip HTML from text.
  if(this.currentChar < this.origText.length) {
    if(this.origText.charAt(this.currentChar) == "<" && !this.inTag) {
      this.tagBuffer = "<";
      this.inTag = true;
      this.currentChar++;
      this.run();
      return;
    } else if(this.origText.charAt(this.currentChar) == ">" && this.inTag) {
      this.tagBuffer += ">";
      this.inTag = false;
      this.currentText += this.tagBuffer;
      this.currentChar++;
      this.run();
      return;
    } else if(this.inTag) {
      this.tagBuffer += this.origText.charAt(this.currentChar);
      this.currentChar++;
      this.run();
      return;
    } else if(this.origText.charAt(this.currentChar) == "&" && !this.inHTMLEntity) {
      this.HTMLEntityBuffer = "&";
      this.inHTMLEntity = true;
      this.currentChar++;
      this.run();
      return;
    } else if(this.origText.charAt(this.currentChar) == ";" && this.inHTMLEntity) {
      this.HTMLEntityBuffer += ";";
      this.inHTMLEntity = false;
      this.currentText += this.HTMLEntityBuffer;
      this.currentChar++;
      this.run();
      return;
    } else if(this.inHTMLEntity) {
      this.HTMLEntityBuffer += this.origText.charAt(this.currentChar);
      this.currentChar++;
      this.run();
      return;
    } else {
      this.currentText += this.origText.charAt(this.currentChar);
    }
    this.element.innerHTML = this.currentText;
    this.element.innerHTML += (this.currentChar < this.origText.length - 1 ? (typeof this.cursor == "function" ? this.cursor(this.currentText) : this.cursor) : "");
    this.currentChar++;
    setTimeout("document.getElementById('" + this.element.id + "').typingText.run()", this.interval);
  } else {
    this.currentText = "";
    this.currentChar = 0;
        this.running = false;
        this.finishedCallback();
  }
}
</script>
<!--[if IE]>
<style type="text/css">
/* Sadly no IE9 support for pointer-events: none; nor CSS2 text-shadow */
#tsb-spot {
    display: none;
}
#tsb-ie {
    position: absolute;
    top: -90%;
    left: -50%;
    width: 200%;
    height: 334%;
    background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPHJhZGlhbEdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgY3g9IjUwJSIgY3k9IjUwJSIgcj0iNzUlIj4KICAgIDxzdG9wIG9mZnNldD0iMCUiIHN0b3AtY29sb3I9IiMwMDAwMDAiIHN0b3Atb3BhY2l0eT0iMCIvPgogICAgPHN0b3Agb2Zmc2V0PSI3NCUiIHN0b3AtY29sb3I9IiMwMDAwMDAiIHN0b3Atb3BhY2l0eT0iMSIvPgogICAgPHN0b3Agb2Zmc2V0PSIxMDAlIiBzdG9wLWNvbG9yPSIjMDAwMDAwIiBzdG9wLW9wYWNpdHk9IjEiLz4KICA8L3JhZGlhbEdyYWRpZW50PgogIDxyZWN0IHg9Ii01MCIgeT0iLTUwIiB3aWR0aD0iMTAxIiBoZWlnaHQ9IjEwMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+);
}
</style>
<![endif]-->

</head>

<body>
 


<div id="text-shadow-box">
    <div id="tsb-box"></div>
    <p id="tsb-text">delm1k</p>
    <p id="tsb-link"><a href="https://куда мы попадем нажав на текст">ваш текст</a></p>
    <p class="hide"></p>
    <div id="tsb-wall">

        <div id="tsb-ie"></div>

<center>
<img src="http://ссылка на картинку отображающею по середине страницы (далее идут параметры на ее высоту и ширину ) " width="150" height="150">
</center>

<p><center><font color="red" face="Trebuchet MS" size="8pt"><b><p><p>


<CENTER>
<script language="JavaScript1.2">


var message="написанный тут текст будет менять цвет сам"
var neonbasecolor="grey"  цвет изначального текста 
var neontextcolor="red" на какой цвет поменять
var flashspeed=077  скорость 
var n=0
if (document.all||document.getElementById){
document.write('<font color="'+neonbasecolor+'">')
for (m=0;m<message.length;m++)
document.write('<span id="neonlight'+m+'">'+message.charAt(m)+'</span>')
document.write('</font>')
}
else
document.write(message)
function crossref(number){
var crossobj=document.all? eval("document.all.neonlight"+number) :
document.getElementById("neonlight"+number)
return crossobj
}
function neon(){
//Change all letters to base color
if (n==0){
for (m=0;m<message.length;m++)
//eval("document.all.neonlight"+m).style.color=neonbasecolor
crossref(m).style.color=neonbasecolor
}
//cycle through and change individual letters to neon color
crossref(n).style.color=neontextcolor
if (n<message.length-1)
n++
else{
n=0
clearInterval(flashing)
setTimeout("beginneon()",1500)
return
}
}
function beginneon(){
if (document.all||document.getElementById)
flashing=setInterval("neon()",flashspeed)
}
beginneon()</script>
</CENTER>

<font color="black" face="DYLOVASTUFF" size="4">ваш текст  </font><br>
<font color="black" face="DYLOVASTUFF" size="4"> ваш текст  <br>
<font color="black" face="DYLOVASTUFF" size="4"> ваш текст   </font><br>
  <font face="Tahoma" size="3" color="#D50000"> от LoRD@</font>
        <script type="text/javascript">
        if (!window.location.href.match(/zachstronaut/)) {
            document.getElementById('zach').style.display = 'none';
        }
        </script>

    </div>
    <div id="tsb-spot"></div>
</div>

<script type="text/javascript" language="javascript" charset="utf-8">



var text = null;
var spot = null;
var box = null;
var boxProperty = '';

init();

function init() {
    text = document.getElementById('tsb-text');
    spot = document.getElementById('tsb-spot');
    box = document.getElementById('tsb-box');
 
    if (typeof box.style.webkitBoxShadow == 'string') {
        boxProperty = 'webkitBoxShadow';
    } else if (typeof box.style.MozBoxShadow == 'string') {
        boxProperty = 'MozBoxShadow';
    } else if (typeof box.style.boxShadow == 'string') {
        boxProperty = 'boxShadow';
    }

    if (text && spot && box) {
        document.getElementById('text-shadow-box').onmousemove = onMouseMove;
        document.getElementById('text-shadow-box').ontouchmove = function (e) {e.preventDefault(); e.stopPropagation(); onMouseMove({clientX: e.touches[0].clientX, clientY: e.touches[0].clientY});};
    }
}

function onMouseMove(e) {
    if (typeof e === 'undefined' || typeof e.clientX === 'undefined') {
        return;
    }
 
    var xm = (e.clientX - Math.floor(window.innerWidth / 2)) * 0.4;
    var ym = (e.clientY - Math.floor(window.innerHeight / 3)) * 0.4;
    var d = Math.round(Math.sqrt(xm*xm + ym*ym) / 5);
    text.style.textShadow = -xm + 'px ' + -ym + 'px ' + (d + 10) + 'px black';
 
    if (boxProperty) {
        box.style[boxProperty] = '0 ' + -ym + 'px ' + (d + 30) + 'px black';
    }
 
    xm = e.clientX - Math.floor(window.innerWidth / 2);
    ym = e.clientY - Math.floor(window.innerHeight / 2);
    spot.style.backgroundPosition = xm + 'px ' + ym + 'px';
}
</script>



скрипт для движущегося текста в названии вкладки
</script>
  <script language="JavaScript">
var brzinakucanja = 200;
var pauzapor = 2000;
var vremeid = null;
var kretanje = false;
var poruka = new Array();
var slporuka = 0;
var bezporuke = 0;
poruka[0] = "-=[| тот самый скрипт для движущегося текста в названии вкладки|]=-"
function prikaz() {
   var text = poruka[slporuka];
   if (bezporuke < text.length) {
      if (text.charAt(bezporuke) == " ")
               bezporuke++
           var ttporuka = text.substring(0, bezporuke + 1);
           document.title = ttporuka;
           bezporuke++
           vremeid = setTimeout("prikaz()", brzinakucanja);
            kretanje = true;
   } else {
      bezporuke = 0;
      slporuka++
      if (slporuka == poruka.length)
         slporuka = 0;
      vremeid = setTimeout("prikaz()", pauzapor);
      kretanje = true;
   }
}
function stop() {
   if (kretanje)
      clearTimeout(vremeid);
   kretanje = false
}
function start() {
   stop();
   prikaz();
}
start();
    </script>

</body>

</html>
конец (скрипт для движущегося текста в названии вкладки)

<link rel="icon" href="http://сылка для отображения  (иконки) во вкладке" type="image/x-icon">
<object data="http://flash-mp3-player.net/medias/player_mp3.swf" width="0" height="0"
type="application/x-shockwave-flash">



<param value="#ffffff" name="bgcolor"><br>

<param
value="mp3=http:/сылка на музыку в формате мп3&amp;loop=1&amp;autoplay=1&amp;volume=125" name="FlashVars"> воспроизведение начнеться после загрузки страницы

</object>


собственно все удачи)

Комментариев нет:

Отправить комментарий