-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBasic_CSS_Demo.css
More file actions
97 lines (81 loc) · 1.85 KB
/
Basic_CSS_Demo.css
File metadata and controls
97 lines (81 loc) · 1.85 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
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 SQAURES IN THE ARRAY */
.container .squares:nth-child(-n+4) {
background-image: url("./images/icons.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 PARAGRAPGHS 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("./images/icons2.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: #12b4ff;
}
.squares:nth-child(2):hover {
background: #d861af;
}
.squares:nth-child(3):hover {
background: #81205f;
}
.squares:nth-child(4):hover {
background: #77b800;
}
/*Animation Effect*/
@keyframes race {
0%, 100% {
transform: translateY(0px);
background-image: url("./images/icons2.png");
}
50% {
transform: translateY(330px);
}
}