JavaScript Bouton Radio et Input
Résolu
didy_gwatinik
Messages postés
352
Date d'inscription
Statut
Membre
Dernière intervention
-
didy_gwatinik Messages postés 352 Date d'inscription Statut Membre Dernière intervention -
didy_gwatinik Messages postés 352 Date d'inscription Statut Membre Dernière intervention -
A voir également:
- JavaScript Bouton Radio et Input
- Radio française - Télécharger - Médias et Actualité
- Bouton reinitialisation pc - Guide
- No video input ✓ - Forum Matériel & Système
- Diagnostic bouton photo - Accueil - Outils
- Bouton shift pc - Forum Jeux vidéo
2 réponses
Ma proposition : à adapter
entre head et /head
Entre body et body:
et dans le CSS:
entre head et /head
<SCRIPT type="text/javascript"> function shiftOpacity(id, millisec) { //if an element is visible, make it invisible, else make it invisible if(document.getElementById(id).style.opacity != 0) { opacity(id, 100, 0, millisec); } else { opacity(id, 0, 100, millisec); } } function opacity(id, opacStart, opacEnd, millisec) { //speed for each frame var speed = Math.round(millisec / 100); var timer = 0; //determine the direction for the blending, if start and end are the same nothing happens if(opacStart > opacEnd) { for(i = opacStart; i >= opacEnd; i--) { setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed)); timer++; } } else if(opacStart < opacEnd) { for(i = opacStart; i <= opacEnd; i++) { setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed)); timer++; } } } //change the opacity for different browsers function changeOpac(opacity, id) { var object = document.getElementById(id).style; object.opacity = (opacity / 100); object.MozOpacity = (opacity / 100); object.KhtmlOpacity = (opacity / 100); object.filter = "alpha(opacity=" + opacity + ")"; } </script>
Entre body et body:
<a href="javascript:shiftOpacity('opacity', 1000)">Artiste</a>
et dans le CSS:
#opacity { border: 0px solid green; opacity: 0; filter : alpha(opacity=0); color: #292929; text-align: center; margin-left: auto; margin-right: auto; width: 100%; } #opacity a { color: black; }
didy_gwatinik
Messages postés
352
Date d'inscription
Statut
Membre
Dernière intervention
80
ouh la je ne comprends pas grand chose à qupi servent les attributs dans opacity?
didy_gwatinik
Messages postés
352
Date d'inscription
Statut
Membre
Dernière intervention
80
>
didy_gwatinik
Messages postés
352
Date d'inscription
Statut
Membre
Dernière intervention
J'ai trouvé : http://www.editeurjavascript.com/forums/topic-27587-4-2.html