Javascript| Menu
Many game menus pop up and look cool, in fact, with simple JavaScript code can easily achieve this effect, this to some of the game of Personal homepage friends very helpful, she can let the viewer have a feeling of immersive, and her original code is very simple oh. Just a few lines below. <title> Simulation game pop-up menu effect </title>
<script language= "JavaScript" >
var b = 0;
var C = true;
function Fade () {
if (document.all);
if (c = = True) {
b+=50;
}
if (b = = 200) {
c = false;
}
U.width= 100;
U.height=b; The size of the picture is 100*200 after the file://is shipped .
SetTimeout ("Fade ()", 0.5); file://Root According to the actual situation choose delay
}
</script>
<body>
<p aign= "center" ><a href= "#" ></a></p>
<p align= "center" ><a href= "#" > Try </a></p>
</body>
The principle is that the beginning of the picture size is 0*0 is not visible, and the operation of the Code, gradually increased;
If you have any questions, please contact