-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstyle.css
More file actions
92 lines (85 loc) · 1.74 KB
/
style.css
File metadata and controls
92 lines (85 loc) · 1.74 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
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@100;300;400;500;600&display=swap");
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: "Poppins", sans-serif;
font-size: 20px;
}
section {
display: flex;
justify-content: center;
align-items: center;
width: 100%;
height: 100vh;
background-color: aliceblue;
}
.container {
background: darkkhaki;
padding: 60px;
border-radius: 8px;
}
.main-title {
font-size: 2rem;
font-weight: 600;
color: bisque;
}
.demo-1,
.demo-2,
.demo-3 {
margin: 80px 0;
padding: 30px;
background-color: white;
text-align: center;
color: teal;
box-shadow: 0px 0px 20px #00000010;
border-radius: 8px;
}
.tooltip {
position: relative;
}
.tooltip::after,
.tooltip::before {
content: "";
position: absolute;
top: 0;
left: 50%;
width: fit-content;
height: auto;
background-color: teal;
transform: translate(-50%, -100%);
transition: 0.3s ease-in-out transform;
}
.tooltip::before {
top: -10px;
padding: 10px;
border-radius: 4px;
font-size: 14px;
font-weight: 300;
line-height: 20px;
color: white;
content: attr(data-tooltips);
transform: translate(-50%, -100%) scale(0);
transform-origin: bottom; /* joining tooltip's top & bottom parts */
}
.tooltip::after {
width: 10px;
height: 10px;
transform: translate(-50%, -150%) rotate(45deg) scale(0);
transform-origin: top; /* joining tooltip's bottom & top parts */
}
/* Making the tooltip appear whith mouse hover */
.tooltip:hover::before {
transform: translate(-50%, -100%) scale(1);
}
.tooltip:hover::after {
transform: translate(-50%, -150%) rotate(45deg) scale(1);
}
.icon {
display: inline-block;
}
.icon ion-icon {
margin-bottom: -4px;
color: coral;
font-size: 22px;
}