-
Notifications
You must be signed in to change notification settings - Fork 2
/
overflow-scroller.css
89 lines (89 loc) · 2.03 KB
/
overflow-scroller.css
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
/*Please edit the less file not the CSS file then run a 'lessc' command */
.overflow-scroller {
overflow-y: hidden;
overflow-x: auto;
-webkit-overflow-scrolling: touch;
white-space: nowrap;
font-size: 0;
line-height: 0;
padding-left: 10px;
padding-right: 10px;
}
.overflow-scroller > * {
display: inline-block;
}
.no-hiddenscroll .overflow-scroller {
margin-bottom: -17px;
}
.overflow-scroller.snap-points {
-webkit-scroll-snap-type: mandatory;
-ms-scroll-snap-type: mandatory;
scroll-snap-type: mandatory;
/* older spec implementation */
-webkit-scroll-snap-destination: 0% 100%;
-ms-scroll-snap-destination: 0% 100%;
scroll-snap-destination: 0% 100%;
-webkit-scroll-snap-points-x: repeat(100%);
-ms-scroll-snap-points-x: repeat(100%);
scroll-snap-points-x: repeat(100%);
}
.overflow-scroller-outer {
position: relative;
overflow: hidden;
}
.overflow-scroller-arrow {
position: absolute;
width: 32px;
height: 32px;
top: 50%;
left: 10px;
border-radius: 50%;
background-color: rgba(0, 0, 0, 0.6);
cursor: pointer;
color: #fff;
transform: translateY(-50%);
transition: all 0.3s ease-out;
padding: 8px 15px;
z-index: 100;
}
@media (min-width: 600px) {
.overflow-scroller-arrow {
left: 15px;
width: 46px;
height: 46px;
}
}
.overflow-scroller-arrow:hover {
background-color: rgba(0, 0, 0, 0.9);
}
.overflow-scroller-arrow.overflow-scroller-arrow-hide {
opacity: 0;
transform: translate(-61px, -50%);
}
.overflow-scroller-arrow-next {
right: 15px;
left: auto;
transform: rotate(180deg) translate(0, 50%);
}
.overflow-scroller-arrow-next.overflow-scroller-arrow-hide {
opacity: 0;
transform: rotate(180deg) translate(-61px, 50%);
}
.overflow-scroller-arrow:before {
content: '';
display: block;
width: 9.6px;
height: 9.6px;
border-right: 1px solid #fff;
border-top: 1px solid #fff;
position: absolute;
transform: rotate(-135deg);
top: 34.5%;
left: 41%;
}
@media (min-width: 600px) {
.overflow-scroller-arrow:before {
width: 13.8px;
height: 13.8px;
}
}