-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path显示三个矩形.html
52 lines (47 loc) · 1.08 KB
/
显示三个矩形.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Page Title</title>
<style>
#div1{
width: 200px;
height: 200px;
background: red;
display: none;
}
#div2{
width: 200px;
height: 200px;
background: rgb(0, 255, 55);
display: none;
}
#div3{
width: 200px;
height: 200px;
background: rgb(89, 0, 255);
display: none;
}
</style>
<script src="./jquery.min (2).js"></script>
<script>
$(document).ready(function(){
$("button").click(function(){
$("#div1").css('display','block');
$("#div2").css('display','block');
$("#div3").css('display','block');
/*$("#div1").fadeTo("slow",0.15);
$("#div2").fadeTo("slow",0.4);
$("#div3").fadeTo("slow",0.7);
*/ })
//fadeout 淡出 fadein 淡入;
})
</script>
</head>
<body>
<button type="button">点击我就会显示三个正方形</button>
<div id="div1"></div>
<div id="div2"></div>
<div id="div3"></div>
</body>
</html>