-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbasic_style.css
More file actions
110 lines (96 loc) · 2.58 KB
/
Copy pathbasic_style.css
File metadata and controls
110 lines (96 loc) · 2.58 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
body{
background-color: #fff;
}
h1{
color: rgba(8, 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("./smileyface2.png");
color: #fff;
float: left;
width: 100px;
height: 100px;
margin: 5px;
border: 1px solid black;
border-radius: 25%;
cursor: pointer;
transition: transform .5s ease-in-out;
}
/*---------------------------------------------
SELECT ALL SQUARES PARAGRAPHS IN THE ARRAY
-----------------------------------------------*/
.squares:nth-child(-n+4) p{
font-family: "Helvetica Neue" Arial, Helvetica, sans-serif;
font-size: 1.5em;
font-weight: 900;
text-align: center;
margin: 0;
text-shadow: 2px 1px 4px rgba(0,0,0, 0.8);
}
/*-------------------------------------------------
INDIVIDUALLY SELECT A SQUARE IN THE ARRAY
---------------------------------------------------*/
.squares:nth-child(1) {
background: #4240ff;
}
.squares:nth-child(2) {
background: #ab3fdd;
}
.squares:nth-child(3) {
background: #ae163e;
}
.squares:nth-child(4) {
background: #00b200;
}
/*------------------------------------------------------
HOVER, TRANSLATE & TRANSFORM EFFECTS
-------------------------------------------------------*/
.container .squares:nth-child(-n+4):hover {
background-image: url("./smileyface1.png");
transform: scale(.5);
animation-name: race;
animation-duration: 2.5s;
animation-iteration-count: infinite;
animation-timing-function:cubic-bezier(2.5,.2,.3,2);
}
.squares:nth-child(1):hover {
background: #13b4ff;
}
.squares:nth-child(2):hover {
background: #d861af;
}
.squares:nth-child(3):hover {
background: #81205f;
}
.squares:nth-child(4):hover {
background: #77b800;
}
.button:hover {
background-color: #33fb14;
color: #fff;
cursor: pointer;
}
/*--------------------------------------------------------
ANIMATION EFFECT
----------------------------------------------------------*/
@keyframes race {
0% 100% {
transform: translateY(0px);
background-image url("./smileyface1.png");
}
50% {
transform: translateY(300px);
}
}