CSS
Copy codeThe Code is as follows:
<Style type = "text/css">
# DivD {
Width: 300px;
Height: 100px;
Background-color: # CC99FF;
}
</Style>
Jquery code
Copy codeThe Code is as follows:
<Script type = "text/javascript" src = "bg/js/jquery-1.4.2.min.js"> </script>
<Script type = "text/javascript">
$ (Document). ready (function (){
$ ("# BtnFadein"). bind ("click", Fadein); // bind btnFadein to the click Time
$ ("# BtnFadeout"). bind ("click", Fadeout); // bind btnFadeout to the click Time
})
Function Fadein (){
$ ("# DivD"). slideDown ("slow"); // slide
}
Function Fadeout (){
$ ("# DivD"). slideUp ("slow"); // slide-out
}
</Script>
HTML
Copy codeThe Code is as follows:
<Body>
<Input type = "button" value = "slip" id = "btnFadein"/>
<Input type = "button" value = "slip out" id = "btnFadeout"/>
<Div id = "divD"> This is div </div>
DIV
</Body>
O (TIPS _ Tips) O make a little progress every day O (TIPS _ Tips) O this BLOG is for individuals to record learning notes. If you have any mistakes, please note!