-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscroll.html
44 lines (41 loc) · 2.09 KB
/
scroll.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<style>
::-webkit-scrollbar{
height: 9px !important;
width: 9px !important;
}
::-webkit-scrollbar-thumb {
border-radius: 0;
border-style: dashed;
background-color: rgba(157, 165, 183, 0.4);
border-color: transparent;
border-width: 1.5px;
background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover {
background: rgba(157, 165, 183, 0.7)
}
</style>
</head>
<body style='margin:0;position: absolute;width: 100%;height: 100%;'>
<div style="width:400px;height: 300px;border:1px solid red;overflow:scroll;margin: 0 auto">
<div style="width:500px;height: 400px;">
用于返回组件的初始化state并且返回更新方法,它只关心你传入的初始值,
可以包装一下更便于抽出逻辑,组件只用于渲染。useState返回的第一个参数就是你
initialState传入的值,也只是这个值,其他的不会影响这个值(如下面代码的注释)
;第二个参数是更新该值的方法,可以看到preCount返回的也只是一个count值。
用于返回组件的初始化state并且返回更新方法,它只关心你传入的初始值,
可以包装一下更便于抽出逻辑,组件只用于渲染。useState返回的第一个参数就是你
initialState传入的值,也只是这个值,其他的不会影响这个值(如下面代码的注释)
;第二个参数是更新该值的方法,可以看到preCount返回的也只是一个count值。
第二个参数是更新该值的方法,可以看到preCount返回的也只是一个count值。
第二个参数是更新该值的方法,可以看到preCount返回的也只是一个count值。
第二个参数是更新该值的方法,可以看到preCount返回的也只是一个count值。
</div>
</div>
</body>
</html>