/*==================================================
　5-2-1 3本線が×に
===================================*/
/*ボタン外側※レイアウトによってpositionや形状は適宜変更してください*/
.openbtn{
	/*ボタン内側の基点となるためrelativeを指定。
追従するナビゲーションの場合はfixed＋top、rightといった位置をセットで指定*/
	position: relative;
	
	cursor: pointer;
    width: 80px;
    height:80px;
	border-radius: 5px;
}

/*ボタン内側*/
.openbtn span{
    display: inline-block;
    transition: all .4s;/*アニメーションの設定*/
    position: absolute;
    left: 22px;
    height: 6px;
    border-radius: 2px;
	background: #5badef;
  	width: 45%;
  }

.openbtn span:nth-of-type(1) {
	top:15px;	
}

.openbtn span:nth-of-type(2) {
	top:30px;
}

.openbtn span:nth-of-type(3) {
	top:45px;
}

/*activeクラスが付与されると線が回転して×に*/

.openbtn.active span:nth-of-type(1) {
    top: 30px;
    left: 18px;
    transform: translateY(6px) rotate(-45deg);
    width: 60%;
    background: #fff;
    z-index: 1000;
}

.openbtn.active span:nth-of-type(2) {
	opacity: 0;/*真ん中の線は透過*/
    z-index: 1000;
}

.openbtn.active span:nth-of-type(3){
    top: 42px;
    left: 18px;
    transform: translateY(-6px) rotate(45deg);
    width: 60%;
    background: #fff;
    z-index: 1000;
}

@media(max-width: 480px) {
    .openbtn{
        right: -20px;
    }
}