-
Notifications
You must be signed in to change notification settings - Fork 0
/
wrap-carousel.css
64 lines (64 loc) · 1.21 KB
/
wrap-carousel.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
.carousel {
font-family: 'Trebuchet MS';
font-size: 1rem;
position: relative;
margin: 40px auto 0 auto;
overflow: hidden;
background: linear-gradient(to bottom, #444, #1a1a1a);
border-radius: 10px;
}
.carousel, .carousel * { box-sizing: content-box; }
.carousel ul {
overflow: hidden;
padding: 0;
position: absolute;
height: calc(100% - (1rem * 2));
margin: 0;
width: calc(100% - (1rem * 2));
}
.carousel li {
top: 25px;
transition: .4s;
left: 0;
border: solid 0px black;
cursor: pointer;
position: absolute;
background-repeat: no-repeat;
list-style: none;
display: block;
overflow: hidden;
border-radius: 10px;
opacity: .4;
}
.carousel li:hover { opacity: 1; }
.carousel .on {
top: 0;
opacity: 1;
box-shadow: 0 6px 22px #222;
}
.carousel li div {
width: 100%;
background: #fff;
position: absolute;
bottom: 0;
border-radius: 10px;
opacity: 0;
transition: .4s;
}
.carousel .on div { opacity: 1; }
.carousel h3 {
margin: 0 0 10px 0;
font-size: 1.6rem;
padding: .5rem 1rem;
background: #ccc;
color: #00659d;
}
.carousel p {
color: #333;
line-height: 1rem;
padding: 0 1rem;
}
.carousel p a {
color: #a9e100;
text-decoration: none;
}