Skip to content

Commit 223c762

Browse files
authored
Merge pull request Dezenix#103 from Nidhikumari-4/main
Awesome Accordion Menu
2 parents 6d7a609 + 48ef5d6 commit 223c762

File tree

4 files changed

+131
-0
lines changed

4 files changed

+131
-0
lines changed

Accordion/Accordion_Menu_02/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
## Awesome Accordion Menu
2+
3+
<h3> Tech Stack Used <img src = "https://media2.giphy.com/media/QssGEmpkyEOhBCb7e1/giphy.gif?cid=ecf05e47a0n3gi1bfqntqmob8g9aid1oyj2wr3ds3mg700bl&rid=giphy.gif" width = 32px> </h3>
4+
<p align="left"> <a href="https://www.w3.org/html/" target="_blank"> <img src="https://raw.githubusercontent.com/devicons/devicon/master/icons/html5/html5-original-wordmark.svg" alt="html5" width="40" height="40"/> </a> <a href="https://www.w3schools.com/css/" target="_blank"> <img src="https://raw.githubusercontent.com/devicons/devicon/master/icons/css3/css3-original-wordmark.svg" alt="css3" width="40" height="40"/> </a> </p>
5+
6+
### Preview
7+
8+
![](./assets/Accordion_menu_preview.jpg)
39.5 KB
Loading
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
7+
<title>Awesome accordion menu</title>
8+
<link rel="stylesheet" href="style.css">
9+
10+
</head>
11+
<body class="body">
12+
<div class="container">
13+
<div class="main">
14+
<div class="item" id="account">
15+
<a href="#account" class="btn">My Account</a>
16+
<div class="subitem">
17+
<a href="">item-1</a>
18+
<a href="">item-2</a>
19+
<a href="">item-3</a>
20+
</div>
21+
</div>
22+
<div class="item" id="about">
23+
<a href="#about" class="btn">About</a>
24+
<div class="subitem">
25+
<a href="">item-1</a>
26+
<a href="">item-2</a>
27+
</div>
28+
</div>
29+
<div class="item" id="support">
30+
<a href="#support" class="btn">Support</a>
31+
<div class="subitem">
32+
<a href="">item-1</a>
33+
</div>
34+
</div>
35+
<div class="item">
36+
<a href="#" class="btn">Log Out</a>
37+
</div>
38+
</div>
39+
</div>
40+
41+
</body>
42+
</html>
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
*{
2+
padding: 0;
3+
margin: 0;
4+
box-sizing: border-box;
5+
}
6+
.body{
7+
background-color: #fcdc29;
8+
display: flex;
9+
justify-content: center;
10+
align-items: center;
11+
margin-top: 200px;
12+
font-family: 'lato';
13+
}
14+
.main{
15+
width: 250px;
16+
display: block;
17+
border-radius: 10px;
18+
overflow: hidden;
19+
}
20+
.item{
21+
border-top: 1px solid #ef584a;
22+
overflow: hidden;
23+
}
24+
.btn{
25+
display: block;
26+
position: relative;
27+
padding: 15px 20px;
28+
background-color: #ff6f61;
29+
color: #fff;
30+
text-decoration: none;
31+
}
32+
.subitem{
33+
background: #273057;
34+
transition: max-height 0.7s;
35+
max-height: 0;
36+
}
37+
.subitem a{
38+
display: block;
39+
padding: 15px 20px;
40+
color: #fff;
41+
font-size: 14px;
42+
border-bottom: 1px solid #394c7f;
43+
position: relative;
44+
text-decoration: none;
45+
}
46+
47+
.subitem a:hover:before{
48+
content: '';
49+
opacity: 1;
50+
transition: opacity 0.3s;
51+
border-top: 24px solid transparent;
52+
border-left: 11px solid #fcdc29;
53+
border-bottom: 24px solid transparent;
54+
position: absolute;
55+
width: 6px;
56+
height: 0;
57+
left: 0;
58+
top:0;
59+
}
60+
61+
.subitem a:hover:after{
62+
content: '';
63+
opacity: 1;
64+
transition: opacity 0.3s;
65+
border-top: 24px solid transparent;
66+
border-right: 11px solid #fcdc29;
67+
border-bottom: 24px solid transparent;
68+
position: absolute;
69+
width: 6px;
70+
height: 0;
71+
right: 0;
72+
top:0;
73+
}
74+
.subitem a:hover{
75+
background: linear-gradient(to bottom, #273057 0%,#273057 50%,#394c7f 51%,#394c7f 100%);
76+
transition: all 0.3s ease-in-out;
77+
border-bottom: 0px solid #394c7f;
78+
}
79+
.item:target .subitem{
80+
max-height: 150px;
81+
}

0 commit comments

Comments
 (0)