<div class="wrapper">
  <ui class="mainMenu">
    <li class="item" id="account">
                <a href="#account" class="btn fiolet"><i class="fas fa-user-circle"></i>Фиолетовая Ветка</a>
                <div class="subMenu">
                    <a href="">Комендантский</a>
                    <a href="">Садовая</a>
                </div>
            </li>
  <li class="item" id="about">
                <a href="#about" class="btn zelen"><i class="fas fa-user-circle"></i>Зеленая Ветка</a>
                <div class="subMenu">
                  <a href="">Беговая</a>
                  <a href="">Василеостровская</a>
                  <a href="">Маяковская</a>
                  <a href="">Ломоносовская</a>
                </div>
            </li>
  <li class="item" id="support">
    <a href="#support" class="btn jeltok"><i class="fas fa-user-circle"></i>Желтая Ветка</a>
                <div class="subMenu">
                  <a href="">Спасская</a>
                  <a href="">Достоевская</a>
                  <a href="">Новочеркасская</a>
                  <a href="">Дыбенко</a>
                </div>
            </li>
<li class="item" id="support1">
                <a href="#support1" class="btn krasn"><i class="fas fa-user-circle"></i>Красная Ветка</a>
     <div class="subMenu">
         <a href="">Площадь Ленина</a>
         <a href="">площадь восстания</a>
         <a href="">Владимирская</a>
         <a href="">Ленинский проспект</a>
         <a href="">проспект ветеранов</a>
      </div>
     </li>
  <li class="item" id="support2">
                <a href="#support2" class="btn sinya"><i class="fas fa-user-circle"></i>Синяя Ветка</a>
               <div class="subMenu">
                 <a href=""> Проспект Просвещения</a>
                  <a href="">Озерки</a>
                  <a href="">Петроградская</a>
                  <a href="">сенная площадь</a>
                  <a href="">Московская</a>
                 <a href="">Купчино</a>
                </div>
            </li>
  <li class="item" id="support">
                <a href="#" class="btn"><i class="fas fa-user-circle"></i>Колпино</a>
            </li>
	<li class="item" id="support">
                <a href="#" class="btn"><i class="fas fa-user-circle"></i>Пушкин</a>
            </li>	
        </ui>
    </div>
*{
    margin: 0;
    padding: 0;
    font-family: 'lato';
    list-style: none;
    text-decoration: none;
}
body{
    background-color: #fff;
}

.wrapper{
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}
.mainMenu{
    width: 280px;
    display: block;
    border-radius: 10px;
    overflow: hidden;
}
.item{
    border-top: 1px solid #ef584a;
    overflow: hidden;
}
.btn{
    display: block;
    padding: 15px 20px;
    background-color: #5e15a1;
    color: #fff;
    position: relative;

}
.btn:before{
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right:8px solid transparent;
    border-top:10px solid #ff6f61;
    right: 15px;
    bottom: -10px;
    z-index: 9;
    
}
.btn i {
    margin-right: 10px;
}
.subMenu{
    background: #273057;
    overflow: hidden;
    transition: max-height 0.7s;
    max-height: 0;
}
.subMenu a{
    display: block;
    padding: 15px 20px;
    color: #fff;
    font-size: 14px;
    border-bottom: 1px solid #394c7f;
    position: relative;
    
}
.subMenu a:before{
    content: '';
    opacity: 0;
    transition: opacity 0.3s;

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

}
.subMenu a:hover:after{
    content: '';
    position: absolute;
    height: 0;
    width: 6px;
    right: 0px;
    top:0;
    opacity: 1;
    /* background-color: #d8d824; */
    border-top: 24px solid transparent;
    border-right: 11px solid #fcdc29;
    border-bottom: 24px solid transparent;
}
.subMenu a:hover{
    background: #273057;
    background: -moz-linear-gradient(top, #273057 0%, #273057 50%, #394c7f 51%, #394c7f 100%);
    background: -webkit-linear-gradient(top, #273057 0%,#273057 50%,#394c7f 51%,#394c7f 100%);
    background: linear-gradient(to bottom, #273057 0%,#273057 50%,#394c7f 51%,#394c7f 100%);
    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#273057', endColorstr='#394c7f',GradientType=0 );
    transition: all 0.3s;
    border-bottom: 1px solid #394c7f;
}
.subMenu a:last-child{
    border:none;
}
.item:target .subMenu{
    max-height: 20em;
}
.fiolet {background-color:#731D7E;}
.zelen {background-color:#019855;}
.jeltok {background-color:#E27300;}
.krasn {background-color:#D80331;}
.sinya {background-color:#0975BD;}

External CSS

  1. https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.8.1/css/all.min.css

External JavaScript

This Pen doesn't use any external JavaScript resources.