-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBasic_CSS_Template.css
More file actions
117 lines (78 loc) · 2.51 KB
/
Copy pathBasic_CSS_Template.css
File metadata and controls
117 lines (78 loc) · 2.51 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
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
body {
background-color: #fff;
}
h1 {
color:rgba(0, 141, 165, 1);
margin-left: 100px;
text-shadow: 1px, .5px, 4px rgba(0, 0, 0, 0.6);
}
.container {
width: 450px;
height: 450px;
background-color: #faebd7;
border: 2px solid black;
border-radius: 5%;
}
/*----------------------------------------------------------
SELECT ALL SQUARES IN THE ARRAY
------------------------------------------------------------*/
.container .squares:nth-child(-n+4){
background-image: url("./images/icons/image1.png");
color: #fff;
float: left;
width: 100px;
height: 100px;
margin: 5px;
border: 1px solid black;
border-radius: 25%;
cursor: pointer;
transition: transform 0.5s ease-in-out;
}
/*-------------------------------------------------------------
INDIVIDUALLY SELECT A SQUARE IN THE ARRAY
------------------------------------------------------------*/
.container .squares:nth-child(1) {
background-color: #4240ff;
}
.container .squares:nth-child(2) {
background-color: #ab3fdd;
}
.container .squares:nth-child(3) {
background-color: #ae1634;
}
.container .squares:nth-child(4) {
background-color: green;
}
/*-----------------------------------------------------------
SELECT ALL SQUARES PARAGRAPHS IN THE ARRAT
------------------------------------------------------------*/
.squares:nth-child(-n+4) p {
font-family: "Helvetica heue" Arial, Helvetica, sans-serif;
font-size: 1.5em;
text-align: center;
margin: 0;
text-shadow: 2px 1px 4px rgba(0,0,0 0.6);
font-weight: 900;
}
/*-----------------------------------------------
Hover & translate transform effects.
------------------------------------------------*/
.squares:nth-child(-n+4):hover {
background-image: url("./images/icons/image2.png");
animation-name: race;
animation-duration: 4s;
animation-iteration-count: infinite;
animation-timing-function: cubic-bezier(2.5 0.3,, 2, 4)
}
/*-----------------------------------------------
Animations effects.
------------------------------------------------*/
@keyframes race {
0, 100% {
tranform: translateY(0px);
background-image: url("./images/icons/image2.png");
}
50% {
transform: translateY(300px);
}
}