-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexample.html
169 lines (138 loc) · 3.56 KB
/
example.html
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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.10.2/css/all.css">
<style>
@import url('https://fonts.googleapis.com/css?family=Saira+Stencil+One&display=swap');
body{
background-color:#0A4A8A;
}
h1
{
font-family: 'Saira Stencil One', cursive;
color:yellow;
text-align:center;
margin-top:10%;
}
p {
margin-top:0px;
}
.bg{
z-index: -1;
position:absolute ;
top:0;
left:0;
height:100%;
width:100%;
opacity:0;
}
.tabs{
display:flex;
flex-direction:row;
justify-content: center;
text-align:center;
}
/*==================================================
Removing the default bullets and checkbox
=================================================*/
.tabs .tab{
overflow: hidden;
}
.tabs .tab .radioClass{
display:none;
}
/*==================================================
styling the icon and label
=================================================*/
.fab{
font-size:75px;
width:85px;
height:85px;
color: white;
box-shadow: 0 0 0 0px rgba(255, 255, 255, 0.3);
border-radius:50%;
transition: background 0.3s, transform 0.3s, box-shadow 0.3s;
}
.tabs .tab label {
display: block;
padding:4vw;
cursor: pointer;
color: grey;
}
/*==================================================
Effects to show when mouse hovers over the menu
=================================================*/
.fab:hover{
box-shadow: 0 0 0 14px rgba(255, 255, 255, 0.3);
background-color:rgba(255, 255, 255, 0.3);
}
.fab:hover ~p{
margin-top:30px;
color:white;
transition:all 1s;
}
/*==================================================
Effects to show when a radio is selected
=================================================*/
.tabs>.tab .radioClass:checked + label>.fab{
box-shadow: 0 0 0 14px #4DDFDC;
background-color:#4DDFDC;
color:black;
transform:scale(1.05);
}
.tabs>.tab .radioClass:checked + label {
color:white;
}
.tabs>.tab .radioClass:checked + label>p {
margin-top:30px;
}
.tabs>.tab .radioClass:checked + label + .bg{
opacity:1;
transition:opacity 1s ease;
}
/*==================================================
Background color for each different div
=================================================*/
#html-bg{
background-color:#0A4A8A;
}
#js-bg{
background: linear-gradient(to right, #11998e, #38ef7d);;
}
#css-bg{
background:linear-gradient(to right, #00f260, #0575e6);;
}
#bootstrap-bg{
background:linear-gradient(to right, #800080, #ffc0cb);;
}
</style>
</head>
<body>
<h1>Tabs with font-awesome icon</h1>
<ul class="tabs">
<li class="tab">
<input class="radioClass" type="radio" name="tabs" checked id="tab1" />
<label for="tab1">
<i class='fab fa-html5'></i>
<p>HTML</p>
</label>
<div class="bg" id="html-bg"></div>
</li>
<li class="tab">
<input class="radioClass" type="radio" name="tabs" id="tab2" />
<label for="tab2"><i class='fab fa-css3'></i> <p>CSS3</p></label>
<div class="bg" id="css-bg"></div>
</li>
<li class="tab">
<input class="radioClass" type="radio" name="tabs" id="tab3" />
<label for="tab3"> <i class="fab fa-node-js"></i><p>Node</p></label>
<div class="bg" id="js-bg"></div>
</li>
<li class="tab">
<input class="radioClass" type="radio" name="tabs" id="tab4" />
<label for="tab4"><i class="fab fa-bootstrap"></i><p>Bootstrap</p></label>
<div class="bg" id="bootstrap-bg"></div>
</li>
</ul>
</body>
</html>