Вот некоторые css фрагмент:
Код: Выделить всё
#nav-bar{
display: block !important;
margin: 0 auto;
height: 100px;
}
#mobile{
display: none !important;
}
@media only screen and (max-width: 400px){
#mobile{
display: none !important;
height: 50px;
min-width: 100px;
position: absolute;
top:50px;
left:20px;
z-index:100;
}
#nav-bar{
display: none !important;
}
}
Код: Выделить всё
let doc = document.getElementById('bar');
let doc2 = document.getElementById('mobile');
let clk = false;
doc.onclick = function(){
clk=!clk;
if(doc.hasAttribute('style','transform:rotate(-450deg) translate(0px,0px);') && !clk){
doc.setAttribute('style','transform:rotate(0deg) translate(0px,0px);');
doc2.setAttribute('style','display:none !important;');
}else{
doc.setAttribute('style','transform:rotate(-450deg) translate(0px,0px);');
doc2.setAttribute('style','display:block !important;');
}
};
Подробнее здесь: https://stackoverflow.com/questions/796 ... -in-js-css