-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstyle.css
More file actions
70 lines (59 loc) · 1.37 KB
/
style.css
File metadata and controls
70 lines (59 loc) · 1.37 KB
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
body {
margin:0
}
.container{
margin: 0;
padding: 0;
list-style: none;
width:100%;
height: 100%;
}
.container a {
position: absolute;
width: 25%;
height: 100%;
text-align: center;
line-height: 200px;
font-size: 50px;
transition: all 0.4s;
z-index: 1;
text-decoration: none;
color:black;
}
.container a:hover {
background: #000;
opacity: 0.5;
color: #fff;
}
.container a:nth-child(2) {
left: 25%;
}
.container a:nth-child(3) {
left: 50%;
}
.container a:nth-child(4) {
left: 75%;
}
.img {
position: absolute;
width:100%;
height:100%;
background: url('https://timedotcom.files.wordpress.com/2017/06/tesla-model-s-hero-image-again-really.jpg?quality=85');
background-size: cover;
transition: all 1s;
}
.container a:nth-child(2):hover ~ .img {
background: url('https://insideevs.com/wp-content/uploads/2017/08/3840x2160-White-MS-Snowy-Mountain-1.jpg');
background-size: cover;
transition: all 1s;
}
.container a:nth-child(3):hover ~ .img {
background: url('http://paperlief.com/images/tesla-model-s-p85d-wallpaper-2.jpg');
background-size: cover;
transition: all 1s;
}
.container a:nth-child(4):hover ~ .img {
background: url('https://innovativer.files.wordpress.com/2016/04/model-x.jpg');
background-size: cover;
transition: all 1s;
}