<div class="cp_navi03">
<ul class="sidenav">
<li><a href="#home" class="active">Home</a></li>
<li><a href="#news">News</a></li>
<li><a href="#contact">Contact</a></li>
<li><a href="#about">About</a></li>
</ul>
</div>
.cp_navi03 ul.sidenav {
position: relative;
display: flex;
flex-direction: column;
width: 200px;
height: auto;
margin: 0;
padding: 0;
background: #f1f1f1;
list-style-type: none;
}
.cp_navi03 ul.sidenav li a {
display: block;
color: #000000;
padding: 15px;
text-decoration: none;
}
.cp_navi03 ul.sidenav li a.active {
background: #da3c41;
color: #ffffff;
}
/*.active以外のhoverの動き*/
.cp_navi03 ul.sidenav li a:hover:not(.active) {
background-color: #1b2538;
color: #ffffff;
}
@media screen and (max-width: 900px) {
.cp_navi03 ul.sidenav {
flex-direction: row;
width: 100%;
}
}
@media screen and (max-width: 480px) {
.cp_navi03 ul.sidenav {
flex-direction: column;
text-align: center;
}
}