begin process at 2012 05 28 14:22:41
  Trouver un code source :
 
dans
 
Accueil > 

Code

 > 

Effets

 > PHRASE ANIMÉE : LE TEXTE ONDULE !

PHRASE ANIMÉE : LE TEXTE ONDULE !


 Information sur la source

Note :
9 / 10 - par 1 personne
9,00 / 10

  • 1

  • 2

  • 3

  • 4

  • 5

  • 6

  • 7

  • 8

  • 9

  • 10
Catégorie :Effets Niveau :Initié Date de création :18/04/2003 Date de mise à jour :18/04/2003 14:36:34 Vu :16 002

Auteur : virtuelkiller

Ecrire un message privé
Site perso
Commentaire sur cette source (0)
Ajouter un commentaire et/ou une note

 Description


Voilà un petit script bien sympathique et très usité dans le grand monde qu'est le web !
Comment le personnaliser ?
Très simple ! Il suffit de modifier cette petite partie :
(à la place de "http://www.paroles-et-musiques.fr.st" mettez le texte de votre choix)

function doWave(n){
  theText = "http://www.paroles-et-musiques.fr.st";
  sizeCycle(theText,1,n);
  if (n > theText.length) {n=0}
  setTimeout("doWave(" + (n+1) + ")", 25);
}

Source

  • <html>
  • <head>
  • <title>Texte ondule</title>
  • <style>BODY {
  • BACKGROUND-COLOR: #ffffff
  • }
  • A {
  • COLOR: navy; TEXT-DECORATION: none
  • }
  • A:hover {
  • COLOR: red
  • }
  • A:visited:unknown {
  • COLOR: #808080
  • }
  • TD {
  • FONT-FAMILY: arial,helvetica; FONT-SIZE: 10pt
  • }
  • </style>
  • <script language="Javascript">
  • <!--
  • function chgdiv(texte){
  • if (navigator.appName=="Netscape"){
  • document.layers['text'].document.write(texte);
  • document.layers['text'].document.close();
  • }
  • else{
  • text.innerHTML=texte;
  • }
  • }
  • function nextSize(i,incMethod,textLength){
  • if (incMethod == 1) return (40*Math.abs( Math.sin(i/(textLength/3.14))) );
  • if (incMethod == 2) return (255*Math.abs( Math.cos(i/(textLength/3.14))));
  • }
  • function sizeCycle(text,method,dis){
  • output = "";
  • for (i = 0; i < text.length; i++){
  • size = parseInt(nextSize(i +dis,method,text.length));
  • output += "<font style='font-size: "+ size +"pt'>" +text.substring(i,i+1)+ "</font>";
  • }
  • chgdiv(output);
  • }
  • function doWave(n){
  • theText = "http://www.paroles-et-musiques.fr.st";
  • sizeCycle(theText,1,n);
  • if (n > theText.length) {n=0}
  • setTimeout("doWave(" + (n+1) + ")", 25);
  • }
  • //-->
  • </script>
  • <script>
  • <!--
  • function highlight(x){
  • document.form.elements[x].focus();
  • document.form.elements[x].select();
  • }
  • //-->
  • </script>
  • </head>
  • <body bgColor="white" onload="doWave(0);">
  • <p align="center">&nbsp; <script language="javascript">
  • <!--
  • if (navigator.appName=="Netscape"){document.writeln('<layer name="text" left="10" top="220"></layer>');}
  • else{document.writeln('<div id="text" style="position:absolute; left:10 top:220px"></div>');}
  • //-->
  • </script> <br>
  • <br>
  • <br>
  • &nbsp; </p>
  • <div id="divZoom"
  • style="HEIGHT: 19px; LEFT: 7px; POSITION: absolute; TOP: 112px; WIDTH: 773px"></div><div></div>
  • <p><br>
  • <font size="+1" face="Comic Sans MS"></p>
  • </font>
  • </body>
  • </html>
<html>

<head>
<title>Texte ondule</title>
<style>BODY {
	BACKGROUND-COLOR: #ffffff
}
A {
	COLOR: navy; TEXT-DECORATION: none
}
A:hover {
	COLOR: red
}
A:visited:unknown {
	COLOR: #808080
}
TD {
	FONT-FAMILY: arial,helvetica; FONT-SIZE: 10pt
}
</style>
<script language="Javascript"> 
<!-- 
function chgdiv(texte){ 
 if (navigator.appName=="Netscape"){ 
  document.layers['text'].document.write(texte); 
  document.layers['text'].document.close(); 
 } 
 else{ 
  text.innerHTML=texte; 
 } 
} 

function nextSize(i,incMethod,textLength){ 
  if (incMethod == 1) return (40*Math.abs( Math.sin(i/(textLength/3.14))) ); 
  if (incMethod == 2) return (255*Math.abs( Math.cos(i/(textLength/3.14)))); 
} 

function sizeCycle(text,method,dis){ 
  output = ""; 
  for (i = 0; i < text.length; i++){ 
    size = parseInt(nextSize(i +dis,method,text.length)); 
    output += "<font style='font-size: "+ size +"pt'>" +text.substring(i,i+1)+ "</font>"; 
  } 
  chgdiv(output); 
} 

function doWave(n){ 
  theText = "http://www.paroles-et-musiques.fr.st"; 
  sizeCycle(theText,1,n); 
  if (n > theText.length) {n=0} 
  setTimeout("doWave(" + (n+1) + ")", 25); 
} 

//--> 
</script>
<script>
<!--
function highlight(x){
document.form.elements[x].focus();
document.form.elements[x].select();
}
//-->
</script>
</head>

<body bgColor="white" onload="doWave(0);">

<p align="center">&nbsp; <script language="javascript"> 
<!-- 
if (navigator.appName=="Netscape"){document.writeln('<layer name="text" left="10" top="220"></layer>');} 
else{document.writeln('<div id="text" style="position:absolute; left:10 top:220px"></div>');} 
//--> 
</script> <br>
<br>
<br>
&nbsp; </p>
<div id="divZoom"
style="HEIGHT: 19px; LEFT: 7px; POSITION: absolute; TOP: 112px; WIDTH: 773px"></div><div></div>

<p><br>
<font size="+1" face="Comic Sans MS"></p>
</font>
</body>
</html>

 Conclusion

Voilà si y'a des questions (ou des commentaires), je suis là pour répondre ! ;-)


 Sources du même auteur

AFFICHER UNE PAGE WEB EN PLEIN ÉCRAN D'UN CLIC !
DU TEXTE DÉFILE DANS LA BARRE D'ÉTAT EN CONTINU !
Source avec Zip UNE IMAGE QUI VOLE...
Source avec Zip AFFICHE OU CACHE UNE IMAGE OU UN LIEN GRÂCE À UN BOUTON
Source avec Zip UN POSTIT POUR LES ACTUS !

 Sources de la même categorie

Source avec Zip Source avec une capture BOUTON ROTATIF par kazma
Source avec Zip Source avec une capture SHOWMAPAREA par phidelum
DHTML IE FILTRE DÉGRADÉ (OUTIL HTML POUR DÉVELOPPEUR) par internetdev
Source avec Zip ANIMATION DU TEXTE par brennal
Source avec Zip Source avec une capture EFFET RAYONS DU SOLEIL par tefa24600

Commentaires et avis

Aucun commentaire pour le moment.

 Ajouter un commentaire




Nos sponsors


Sondage...

CalendriCode

Mai 2012
LMMJVSD
 123456
78910111213
14151617181920
21222324252627
28293031   

Consulter la suite du CalendriCode

A découvrir



 
Développement réalisé par Nicolas SOREL (Nix) avec l'aide de : Cyril DURAND et Emmanuel (EBArtSoft), Merci à Vincent pour ses précieux conseils.
CodeS-SourceS.com© Toute reproduction même partielle est interdite sauf accord écrit du Webmaster
CodeS-SourceS.com© est une marque déposée tous droits réservés

Google Coop CodeS-SourceS Google Coop CodeS-SourceS
Temps d'éxécution de la page : 0,733 sec (4)

Nous contacter | Annoncer sur CodeS-SourceS | Mentions légales