Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions Accordion/Accordion_Menu_02/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
## Awesome Accordion Menu

<h3> Tech Stack Used <img src = "https://media2.giphy.com/media/QssGEmpkyEOhBCb7e1/giphy.gif?cid=ecf05e47a0n3gi1bfqntqmob8g9aid1oyj2wr3ds3mg700bl&rid=giphy.gif" width = 32px> </h3>
<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>

### Preview

![](./assets/Accordion_menu_preview.jpg)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
42 changes: 42 additions & 0 deletions Accordion/Accordion_Menu_02/code/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Awesome accordion menu</title>
<link rel="stylesheet" href="style.css">

</head>
<body class="body">
<div class="container">
<div class="main">
<div class="item" id="account">
<a href="#account" class="btn">My Account</a>
<div class="subitem">
<a href="">item-1</a>
<a href="">item-2</a>
<a href="">item-3</a>
</div>
</div>
<div class="item" id="about">
<a href="#about" class="btn">About</a>
<div class="subitem">
<a href="">item-1</a>
<a href="">item-2</a>
</div>
</div>
<div class="item" id="support">
<a href="#support" class="btn">Support</a>
<div class="subitem">
<a href="">item-1</a>
</div>
</div>
<div class="item">
<a href="#" class="btn">Log Out</a>
</div>
</div>
</div>

</body>
</html>
81 changes: 81 additions & 0 deletions Accordion/Accordion_Menu_02/code/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
*{
padding: 0;
margin: 0;
box-sizing: border-box;
}
.body{
background-color: #fcdc29;
display: flex;
justify-content: center;
align-items: center;
margin-top: 200px;
font-family: 'lato';
}
.main{
width: 250px;
display: block;
border-radius: 10px;
overflow: hidden;
}
.item{
border-top: 1px solid #ef584a;
overflow: hidden;
}
.btn{
display: block;
position: relative;
padding: 15px 20px;
background-color: #ff6f61;
color: #fff;
text-decoration: none;
}
.subitem{
background: #273057;
transition: max-height 0.7s;
max-height: 0;
}
.subitem a{
display: block;
padding: 15px 20px;
color: #fff;
font-size: 14px;
border-bottom: 1px solid #394c7f;
position: relative;
text-decoration: none;
}

.subitem a:hover:before{
content: '';
opacity: 1;
transition: opacity 0.3s;
border-top: 24px solid transparent;
border-left: 11px solid #fcdc29;
border-bottom: 24px solid transparent;
position: absolute;
width: 6px;
height: 0;
left: 0;
top:0;
}

.subitem a:hover:after{
content: '';
opacity: 1;
transition: opacity 0.3s;
border-top: 24px solid transparent;
border-right: 11px solid #fcdc29;
border-bottom: 24px solid transparent;
position: absolute;
width: 6px;
height: 0;
right: 0;
top:0;
}
.subitem a:hover{
background: linear-gradient(to bottom, #273057 0%,#273057 50%,#394c7f 51%,#394c7f 100%);
transition: all 0.3s ease-in-out;
border-bottom: 0px solid #394c7f;
}
.item:target .subitem{
max-height: 150px;
}