-
Notifications
You must be signed in to change notification settings - Fork 294
/
Copy pathindex.html
214 lines (183 loc) · 8.59 KB
/
index.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
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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>自定义滚动条样式</title>
<style>
.text-clip {
width: 220px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.parent {
overflow: auto;
}
.box {
float: left;
width: 150px;
height: 250px;
margin: 0 40px 40px 0;
border: 1px solid #eee;
}
.box1 {
overflow: visible;
}
.box2 {
overflow: hidden;
}
.box3 {
overflow: scroll;
}
.box4 {
overflow: auto;
}
.box5 {
overflow: inherit;
}
.box6,
.box7,
.box8,
.box9,
.box10 {
overflow-y: scroll;
}
.box6::-webkit-scrollbar {
width: 10px;
}
.box6::-webkit-scrollbar-track {
border-radius: 5px;
background-color: #eee;
}
.box6::-webkit-scrollbar-thumb {
border-radius: 5px;
background: #3DB6A4;
}
.box7::-webkit-scrollbar {
width: 6px;
}
.box7::-webkit-scrollbar-track {
background-color: #eee;
}
.box7::-webkit-scrollbar-thumb {
background: #3DB6A4;
}
.box8::-webkit-scrollbar {
width: 12px;
background-color: #eee;
}
.box8::-webkit-scrollbar-track {
background-color: #eee;
}
.box8::-webkit-scrollbar-thumb {
background: #3DB6A4;
}
.box8::-webkit-scrollbar-button:start {
background: url(./imgs/up.png) no-repeat;
background-size: 12px 12px;
}
.box8::-webkit-scrollbar-button:end {
background: url(./imgs/down.png) no-repeat;
background-size: 12px 12px;
}
.box9 {
overflow: scroll;
}
/*width为垂直滚动条的宽度,height为水平滚动条的高度*/
.box9::-webkit-scrollbar {
width: 12px;
height: 12px;
}
.box9::-webkit-scrollbar-track {
background-color: #eee;
}
.box9::-webkit-scrollbar-thumb {
background: #3DB6A4;
}
/*自定义交汇处*/
.box9::-webkit-scrollbar-corner {
background: url(./imgs/jiaocha.png) no-repeat;
background-size: 12px 12px;
}
.box10::-webkit-scrollbar {
width: 12px;
}
.box10::-webkit-scrollbar-track {
background-color: #eee;
}
.box10::-webkit-scrollbar-thumb {
background: #3DB6A4;
background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .2) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .2) 50%, rgba(255, 255, 255, .2) 75%, transparent 75%, transparent);
}
.box10::-webkit-scrollbar-track-piece{
background-color:#eee;
}
.box10::-webkit-scrollbar-button:start {
background: url(./imgs/up.png) no-repeat;
background-size: 12px 12px;
}
.box10::-webkit-scrollbar-button:end {
background: url(./imgs/down.png) no-repeat;
background-size: 12px 12px;
}
</style>
</head>
<body>
<h3 class="text-clip">下面是overflow属性值巴拉巴拉巴拉巴拉啦啦啦啦</h3>
<div class="parent">
<div class="box box1">
<h4>overflow:visible,我是box1</h4>
<p>这个属性定义溢出元素内容区的内容会如何处理。如果值为 scroll,不论是否需要, 用户代理都会提供一种滚动机制。因此,有可能即使元素框中可以放下所有内容也 会出现滚动条。
</p>
</div>
<div class="box box2">
<h4>overflow:hidden,我是box2</h4>
<p>这个属性定义溢出元素内容区的内容会如何处理。如果值为 scroll,不论是否需要, 用户代理都会提供一种滚动机制。因此,有可能即使元素框中可以放下所有内容也 会出现滚动条。
</p>
</div>
<div class="box box3">
<h4>overflow:scroll,我是box3</h4>
<p>这个属性定义溢出元素内容区的内容会如何处理。如果值为 scroll,不论是否需要, 用户代理都会提供一种滚动机制。因此,有可能即使元素框中可以放下所有内容也 会出现滚动条。
</p>
</div>
<div class="box box4">
<h4>overflow:auto,我是box4</h4>
<p>这个属性定义溢出元素内容区的内容会如何处理。如果值为 scroll,不论是否需要, 用户代理都会提供一种滚动机制。因此,有可能即使元素框中可以放下所有内容也 会出现滚动条。
</p>
</div>
<div class="box box5">
<h4>overflow:inherit,我是box5</h4>
<p>此处父元素设置的是auto。这个属性定义溢出元素内容区的内容会如何处理。如果值为 scroll,不论是否需要, 用户代理都会提供一种滚动机制。因此,有可能即使元素框中可以放下所有内容也 会出现滚动条。
</p>
</div>
</div>
<h3 class="text-clip">下面是自定义滚动条样式巴拉巴拉巴拉巴拉啦啦啦啦</h3>
<div class="scroll-wrap">
<div class="box box6">
<p>这个属性定义溢出元素内容区的内容会如何处理。如果值为 scroll,不论是否需要, 用户代理都会提供一种滚动机制。因此,有可能即使元素框中可以放下所有内容也 会出现滚动条。 这个属性定义溢出元素内容区的内容会如何处理。如果值为
scroll,不论是否需要, 用户代理都会提供一种滚动机制。因此,有可能即使元素框中可以放下所有内容也 会出现滚动条。
</p>
</div>
<div class="box box7">
<p>这个属性定义溢出元素内容区的内容会如何处理。如果值为 scroll,不论是否需要, 用户代理都会提供一种滚动机制。因此,有可能即使元素框中可以放下所有内容也 会出现滚动条。 这个属性定义溢出元素内容区的内容会如何处理。如果值为
scroll,不论是否需要, 用户代理都会提供一种滚动机制。因此,有可能即使元素框中可以放下所有内容也 会出现滚动条。
</p>
</div>
<div class="box box8">
<p>这个属性定义溢出元素内容区的内容会如何处理。如果值为 scroll,不论是否需要, 用户代理都会提供一种滚动机制。因此,有可能即使元素框中可以放下所有内容也 会出现滚动条。 这个属性定义溢出元素内容区的内容会如何处理。如果值为
scroll,不论是否需要, 用户代理都会提供一种滚动机制。因此,有可能即使元素框中可以放下所有内容也 会出现滚动条。
</p>
</div>
<div class="box box9">
<p>这个属性定义溢出元素内容区的内容会如何处理。如果值为 scroll,不论是否需要, 用户代理都会提供一种滚动机制。因此,有可能即使元素框中可以放下所有内容也 会出现滚动条。 这个属性定义溢出元素内容区的内容会如何处理。如果值为
scroll,不论是否需要, 用户代理都会提供一种滚动机制。因此,有可能即使元素框中可以放下所有内容也 会出现滚动条。
</p>
</div>
<div class="box box10">
<p>这个属性定义溢出元素内容区的内容会如何处理。如果值为 scroll,不论是否需要, 用户代理都会提供一种滚动机制。因此,有可能即使元素框中可以放下所有内容也 会出现滚动条。 这个属性定义溢出元素内容区的内容会如何处理。如果值为
scroll,不论是否需要, 用户代理都会提供一种滚动机制。因此,有可能即使元素框中可以放下所有内容也 会出现滚动条。
</p>
</div>
</div>
</body>
</html>