あなたは以下のことを試みることができる
私のウェブサイトはでアップしています。基本的にmargin-left
をmin-width: 768px
から-180px
に設定し、padding-left
を使用してナビを元の位置に戻します。 margin-left
変更transition: all 0.3s ease-in-out;
からtransition: margin-left 0.3s ease-in-out;
に移行しているだけなので
.main-navigation {
position: fixed;
height: 100%;
width: 180px;
background-color: #000;
margin-left: -180px;
padding-left: 0;
transition: margin-left 0.3s ease-in-out;
box-shadow: 0px 0px 8px 0px rgba(0, 0, 0, 0.75);
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-between;
}
@media screen and (min-width: 768px)
.main-navigation {
position: fixed;
height: 80px;
width: 100%;
margin-left: -180px;
padding-left: 180px;
background-color: transparent;
transition: none;
box-shadow: none;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
}
}
遷移を最大幅のメディアクエリに入れます。 – Dominofoe
まだ同じ問題があります@Dominofoe – Zoid