Page 1 sur 1

effet de fondue sur une page web

Publié : 11 déc. 2004, 21:03
par dryll
je cherches à créer un effet de fondue sur une page web
qui marche sous mozilla et konqueror

Publié : 11 déc. 2004, 21:15
par PsyDk
C'est quoi exactement comme effet que tu souhaites faire ?

Sinon y'a ça : Fondue en 35 minutes

(désolé c'est samedi soir)

Publié : 11 déc. 2004, 21:39
par PsyDk
Bon, je n'étais pas sûr de quel effet il s'agissait. J'ai fait un fade-out de la page. Voici la page xhtml avec le javascript dedans qui fait ça :

Code : Tout sélectionner

<?xml version="1.0" encoding="iso-8859-15"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
<head>
<title>Fading</title>

<style type="text/css">
html
{
	background: #444;
}
p
{
	background: #f00;
}

p#Suivant
{
	text-align: center;
	background: #ff8;
	font-size: 20px;
}
</style>

<script type="text/javascript">
function DoFadingLoop(strUrl)
{
	var body = document.getElementsByTagName("body")[0];

	if( body.style.opacity > 0)
	{
		body.style.opacity -= 0.1;
		setTimeout("DoFadingLoop('" + strUrl + "')", 100);
	}
	else
	{
		document.location = strUrl;
	}
}

function DoFading(strUrl)
{
	var body = document.getElementsByTagName("body")[0].style.opacity = 1.0;
	DoFadingLoop(strUrl);
}
</script>

</head>
<body>

<p>plop</p>

<p id="Suivant"><a href="pouet.html" onclick="DoFading(this.href); return false;">pouet</a></p>

</body>
</html>

Publié : 12 déc. 2004, 07:55
par uzul
Tu trouveras tout ce que tu veux en matière d'effets ici:
http://www.dynamicdrive.com/

Publié : 12 déc. 2004, 12:34
par bambi
Un article qui pourrait bien t'intéresser :wink:
:arrow: http://www.biblographia.net/article/34/ ... sans-flash
Cette méthode à le mérite d’être compatible pour tous les navigateurs mais surtout accessible.

merci

Publié : 12 déc. 2004, 16:01
par dryll
merci beaucoup