GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — webSpecialEffect/Collapse.html at master · 93qlin/webSpecialEffect

Expand file tree

/

Collapse.html

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
119 lines (119 loc) · 2.32 KB
/

Collapse.html

Copy path

File metadata and controls

119 lines (119 loc) · 2.32 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<link rel="stylesheet" href="icon/iconfont.css">
<style>
* {
margin:0;
padding:0;
box-sizing: border-box;
}
body {
text-align:center;
font:75% Verdana, Arial, Helvetica, sans-serif;
}
h1 {
font:125% Arial, Helvetica, sans-serif;
text-align:left;
font-weight:bolder;
background:#555;
line-height: 30px;
padding:1px;
display:block;
color:#99CC00;
cursor: pointer;
}
.class1 {
width:100%;
background:#0f0;
position:relative;
margin:0 auto;
padding:1px;
}
.class1 span {
position:absolute;
right:10px;
top:8px;
font-size: 14px;
cursor:pointer;
color:yellow;
}
.class1 span i{
padding-right: 5px;
}
.rotate{
transform:rotate(180deg);
}
.class1 p {
text-align:left;
line-height:20px;
background:#555;
padding:1px;
margin-top:1px;
color:#99CC00
}
#class1content {
height:auto;
overflow:hidden
}
</style>
</head>
<body>
<div id="collapse">
<div class="class1">
<h1 onclick="$use()">展开/折叠效果</h1>
<span id="stateBut" onclick="$use()"><span class="rotate"><i class="iconfont icon-arrowDown"></i></span>收缩</span>
<p id="class1content">内容区
</p>
</div>
</div>
</body>
</html>
<script>
var collapse = document.getElementById('collapse');
var d=collapse.getElementsByTagName('p')[0]
var h = d.offsetHeight;
function $(element) {
return element = document.getElementById(element);
}
function $D(h) {
var hh=d.offsetHeight;
function dmove(){
hh+=5; //层展开速度
if( hh>=h ) {
clearInterval(iIntervalId);
} else {
d.style.display='block';
d.style.height=h+'px';
}
}
iIntervalId=setInterval(dmove,2);
}
function $D2(h) {
function dmove(){
h-=50;//层收缩速度
if (h<=0) {
d.style.display='none';
clearInterval(iIntervalId);
}else {
d.style.height=h+'px';
}
}
iIntervalId=setInterval(dmove,2);
}
function $use() {
var sb=$('stateBut');
/*if(d.offsetHeight>0){
h = d.offsetHeight;
}*/
if(d.style.display=='none') {
$D(h);
sb.innerHTML='<b>收缩</b>';
}else {
$D2(h);
sb.innerHTML='<b>展开</b>';
}
}
</script>
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.