1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Document sans nom</title>
<style type="text/css">
.divInfo{
position:fixed;
bottom:0px;
width:100%;
height:35px;
line-height:35px;
color:#ffffff;
}
.divBackground{
position:absolute;
top:0px;
left:0px;
width:100%;
height:35px;
background-color:#000000;
opacity: 0.6;
filter:alpha(opacity=60);
z-index:50;
font-size:24px;
}
.divText{
position:absolute;
top:0px;
left:0px;
width:100%;
height:35px;
z-index:200;
font-size:24px;
}
#toto{
margin-top:150px;
}
</style>
<script type="text/javascript">
var news = new Array();
news[0] = ["Politique","pas bien la politique"];
news[1] = ["sport","On a perdu la coupe du monde"];
news[2] = ["sport","laure manuchao remporte la coupe de maracass"];
var NbDeNews = news.length -1 // Permet de vérifier ou on en est pour l'affichage des news et boucler
function changementTitreNews(numNews){
document.getElementById("titre").innerHTML = "Section : " + news[numNews][0] +" titre : "+news[numNews][1]+" et i = "+numNews+"<br />";
if(NbDeNews == numNews){
numNews = 0 ;
}
else{
numNews++;
}
setTimeout(function() {changementTitreNews(numNews);}, 2000);
}
</script>
</head>
<body>
et le texte derrière pour voir la transparence
<div class="divInfo">
<div class="divBackground"></div>
<div class="divText" id="titre">et plein de texte sympa ici</div>
</div>
<div id="toto"></div>
<script type="text/javascript">
changementTitreNews(0);
</script>
</body>
</html> |
Partager