Menu A lot of game menu pop up looks 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 after the run is 100*200
SetTimeout ("Fade ()", 0.5); Choose the delay according to the actual situation
}
</script>
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
Wang Zhengliang: feverless@263.net
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.