-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhorizontal_accordion.html
More file actions
167 lines (144 loc) · 3.11 KB
/
horizontal_accordion.html
File metadata and controls
167 lines (144 loc) · 3.11 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
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
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.10.2/css/all.css">
<style>
body{
background: #f77462;
}
h2
{
font-family: 'Saira Stencil One', cursive;
text-align:center;
margin-top:10%;
}
.accordion_menus{
margin-left:15%;
background: #5ab2ca;
width: 65%;
min-width: 800px;
overflow: hidden;
height: 200px;
font-size: 0;
}
.accordion{
display: inline-block;
background-color: #6dc5dd;
border-right: #5ab2ca 1px solid;
width: 80px;
overflow: hidden;
position: relative;
margin: 0;
font-size: 16px;
transition: all 0.4s ease-in-out 0.1s;
}
.accordion:hover{
width: 450px;
}
.fab{
font-size: 3em;
color:white;
display: block;
line-height: 0;
}
.accordion .content {
position: relative;
width: 360px;
margin-left: 80px;
padding: 10px 0 0 10px;
height: 200px;
background: #fff;
}
.fab:before, .fab:after {
transition: all 0.4s ease-in-out 0.1s;
position: absolute;
padding-top: 90px;
padding-left: 25px;
}
.fab:after{
padding-left: 20px;
margin-left: 85px;
width:100%;
height:100%;
background-size: 100%;
background-image: linear-gradient(#283e56, #325372);
}
.fa-html5:after{
color:yellow;
content:'\f13b';
}
.fa-css3-alt:after{
color:#47B0F9;
content:'\f38b';
}
.fa-js:after{
background-color:black;
color:white;
content:'\f3b8';
}
.fa-bootstrap:after{
content:'\f836';
}
.fa-node-js:after{
color:#83CD29;
content:'\f3d3';
}
.accordion:hover .fab:before {
margin-left: -100px;
}
.accordion:hover .fab:after {
margin-left: -5px;
}
</style>
</head>
<body>
<h2>Horizontal Accordion with Pure CSS</h2>
<ul class="accordion_menus">
<li class="accordion">
<div class="icons">
<i class='fab fa-html5'></i>
</div>
<div class="content">
<h1>HTML</h1>
<p>This is pure HTML and CSS Accordion Menu designed for your next project</p>
</div>
</li>
<li class="accordion">
<div class="icons">
<i class="fab fa-css3-alt"></i>
</div>
<div class="content">
<h1>CSS</h1>
<p>This is pure css Accordion design using HTML and CSS only</p>
</div>
</li>
<li class="accordion">
<div class="icons">
<i class='fab fa-node-js'></i>
</div>
<div class="content">
<h1>Node.js</h1>
<p>This is pure HTML CSS designed Horizontal Accordion Menu</p>
</div>
</li>
<li class="accordion">
<div class="icons">
<i class='fab fa-bootstrap'></i>
</div>
<div class="content">
<h1>Bootstrap</h1>
<p>In this example we won't be using Bootstrap for Accordion development. </p>
</div>
</li>
<li class="accordion">
<div class="icons">
<i class='fab fa-js'></i>
</div>
<div class="content">
<h1>JavaScript</h1>
<p>In this tutorial we are designing Horizontal Accordion for website without JavaScript. </p>
</div>
</li>
</ul>
</body>
</html>