Ciao ragazzi, sto creando un sito per il mio server di Minecraft, io vorrei che quando vai con la freccia sul rettangolo chiamato "intro", ci sia il
Codice PHP:
.fadeTo("slow", 1);
del rettangolo e del testo nel rettangolo chiamato "introtext" soltanto che non esegue l'animazione! Così per quando togli il cursore, ci sia
Codice PHP:
.fadeTo("slow", 0.4);
di questi elementi.
Mi aiutate? Centra con il codice "CSS"?
Il mio codice HTML:
Codice PHP:
<!DOCTYPE html>
<html>
<head>
<title>UniverseCraft</title>
<link type="text/css" rel="stylesheet" href="index.css">
<script type="text/javascript" src="index.js"></script>
</head>
<body background="http://forum.it.altervista.org/images/background.png">
<div id="gray1"></div>
<div id="gray2"></div>
<div id="gray3"></div>
<div id="forum">Forum</div>
<div id="wiki">Wiki</div>
<div id="boh">???</div>
<div id="intro">
<div id="introtext">
<strong>Introduzione:</strong></br>
Questo è un server abbastanza famosetto, è hostato 24/7!</br>
Lo staff è suddiviso in:</br>
Founder: x_Astral_x, x_CoSMoS_x, Luigioxxx;</br>
Programmatori: Io (lorizz);</br>
</div>
</div>
</body>
</html>
Il mio codice CSS:
Codice PHP:
#gray1 {
background-color: gray;
height: 100px;
width: 120px;
opacity: 0.4;
position: fixed;
top: 20px;
left: 50px;
border-radius: 10px;
}
#gray2 {
background-color: gray;
height: 100px;
width: 120px;
opacity: 0.4;
position: fixed;
top: 20px;
left: 200px;
border-radius: 10px;
}
#gray3 {
background-color: gray;
height: 100px;
width: 120px;
opacity: 0.4;
position: fixed;
top: 20px;
left: 350px;
border-radius: 10px;
}
#forum {
font-family: Tahoma;
position: fixed;
top: 30px;
left: 60px;
color: white;
}
#wiki {
font-family: Tahoma;
position: fixed;
top: 30px;
left: 220px;
color: white;
}
#boh {
font-family: Tahoma;
position: fixed;
top: 30px;
left: 370px;
color: white;
}
#intro {
background-color: gray;
height: 200px;
width: 500px;
opacity: 0.4;
position: fixed;
top: 400px;
left: 50px;
border-radius: 10px;
}
#introtext {
font-family: Tahoma;
position: fixed;
top: 420px;
left: 70px;
color: white;
}
Il mio codice jQuery:
Codice PHP:
var $intro = $("#intro");
var $introtext = $("#introtext");
$(document).ready(function() {
$intro.mouseenter(function() {
$intro.fadeTo("slow", 1);
$introtext.fadeTo("slow", 1);
});
$intro.mouseleave(function() {
$intro.fadeTo("slow", 0.4);
$introtext.fadeTo("slow", 1);
});
});