-
AUTO SCROLL [urgente]
vorrei fare un auto scroll per un sito che stò curando io
http://caosweb.altervista.org/zucchero/
se vedete le news sulla destra scorrono, però vorrei fossero
più fluide e che sul passaggio del mouse si fermassero per dare
il tempo di lettura. Al termine della pagina si bloccano qualche
secondo e poi ripartono, mi aiutate??
-
Invece di usare uno script, puoi usare il tag <marquee>.
-
-
Codice HTML:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>News</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
</script>
<style>
BODY { FONT-WEIGHT: bold;
FONT-SIZE: 10px;
FONT-FAMILY: Verdana;
FONT-COLOR : #FFFFFF;
margin:0px;
padding:0px;
leftMargin:0;
topMargin:0;
marginwidth:0;
marginheight:0;
bgcolor:#FFFFFF;
}
FONT { FONT-WEIGHT: bold;
FONT-SIZE: 10px;
FONT-FAMILY: Verdana;
FONT-COLOR : #FFFFFF;
margin:0px;
padding:0px;
leftMargin:0;
topMargin:0;
marginwidth:0;
marginheight:0;
bgcolor:#FFFFFF;
}
TD {
FONT-WEIGHT: bold;
FONT-SIZE: 12px;
COLOR: #FFFFFF;
font-weight: bold;
FONT-FAMILY: Verdana;
TEXT-DECORATION: none;
text-align: left;
padding: 0px;
border: 0px;
border: 0;
cellpadding: 0;
cellspacing: 0;
}
A {FONT-WEIGHT: bold; FONT-SIZE: 12px; COLOR: #FFFFFF; font-weight: bold; FONT-FAMILY: Verdana; TEXT-DECORATION: none}
A:link {color: #FFFFFF; font-weight: bold; text-decoration : none;}
A:visited {color: #FFFFFF; font-weight: bold; text-decoration: none; }
A:hover{ color: #FFFFFF; font-weight: bold; text-decoration: none; cursor:help;}
</style>
</head>
<body bgcolor="#FF3300">
<marquee behavior="scroll" direction="up" scrollamount=1 scrolldelay=5 onMouseOver="this.stop()" onMouseOut="this.start()">
<table width="326" height="241" border="0" cellpadding="0" cellspacing="0" >
<tr>
<td width="326" height="225" background="../sets_grafico/09.jpg">
<div align="center"><font>-------------------------------------------------------------<br><br>
<table width="320" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="109" rowspan="2"><img src="news_s/simo.jpg" width="123"></td>
<td width="217">TITOLO</td>
</tr>
<tr>
<td>CORPO DEL MESSAGGIO</td>
</tr>
</table><br> <div align="center"><font>-------------------------------------------------------------<br><br>
<table width="320" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="109" rowspan="2"><img src="news_s/oscar.jpg" width="123"></td>
<td width="217">Partecipa al sondaggio</td>
</tr>
<tr>
<td>vai sul nostro forum e partecipa al nostro sondaggio</td>
</tr>
</table><br> <div align="center"><font>-------------------------------------------------------------<br><br>
<table width="320" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="109" rowspan="2"><img src="news_s/Grafica1.jpg" width="123"></td>
<td width="217">MONDO ANIMAZIONE</td>
</tr>
<tr>
<td>anche la zucchero animazione aderisce al gruppo MONDO ANIMAZIONE</td>
</tr>
</table><br> <div align="center"><font>-------------------------------------------------------------<br><br>
<table width="320" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="109" rowspan="2"><img src="news_s/100_9755.JPG" width="123"></td>
<td width="217">SITO WEB</td>
</tr>
<tr>
<td>prove tecniche per il nuovo sito della zucchero animazione</td>
</tr>
</table><br> <div align="center"><font>-------------------------------------------------------------<br><br>
<table width="320" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="109" rowspan="2"><img src="news_s/foto (Mary) 165.jpg" width="123"></td>
<td width="217">Ricerchiamo nuovi animatori</td>
</tr>
<tr>
<td>vuoi essere uno di noi??</td>
</tr>
</table><br> <div align="center"><font>-------------------------------------------------------------<br><br>
<table width="320" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="109" rowspan="2"><img src="news_s/salice.jpg" width="123"></td>
<td width="217">STAGE IN MONTAGNA</td>
</tr>
<tr>
<td>si terra dal 14 al 18 dicembre il settimo ed ultimo stage prima della partenza per la stagione invernale</td>
</tr>
</table></td>
</tr>
</table></marquee>
</body>
</html>
-
Tutto corretto, solo una precisazione: per modificare la velocità del testo, regola i valori SCROLLDELAY (quanti millisecondi passano tra uno spostamento e l'altro) e SCROLLAMOUNT (di quanti pixel si sposta il testo da una visualizzazione all'altra).
Altra cosa: ti consiglio di aggiungere un attributo HEIGHT="valore in pixel", in modo che l'altezza del MARQUEE non sia pari a quella del testo.
Statemi bene...