nav {
    position: fixed;
    top: 24px;
    width: 100%;
    z-index: 10;
}
ul {
    /*最初はナビゲーションボタンは非表示*/
    display: none;
    list-style:none;
}
h3{
background-color: #1A7EFF;
padding: 2px;
margin-left:3px;
color: white;
}
li a{
    padding: 8px;
    font-size: 16px;
    color: #464646;
    display: block;
    text-align: center;
    text-decoration: none;
    background-color: lightgray;
}
.hamburger {
    position: absolute;
    top: 32px;
    right:32px;
    cursor: pointer;
    width: 32px;
    height: 24px;
    z-index: 10;
}
.hamburger span {
    /*3本の線を作る*/
    transition: all .3s;
    position: absolute;
    height: 2px;
    background-color: #333;
    width:100%;
    z-index: 10;
}
.hamburger span:nth-of-type(1) {
    /*上の線の位置*/
    top: 4px;
}
.hamburger span:nth-of-type(2) {
    /*真ん中の線の位置*/
    top: 12px;
}
.hamburger span:nth-of-type(3) {
    /*下の線の位置*/
    top: 20px;
}
.hamburger.open span:nth-of-type(1) {
    /*openのとき、上の線を右斜めにする*/
    top: 10px;
    transform: translateY(6px) rotate(-33deg);
}
.hamburger.open span:nth-of-type(2) {
    /*真ん中の線を消す*/
    opacity: 0;
}
.hamburger.open span:nth-of-type(3) {
    /*下の線を左斜めにする*/
    top: 22px;
    transform: translateY(-6px) rotate(33deg);
}



Resources