简体   繁体   中英

When resizing screen to 768px the navigation change style

I am building mobile navigation. When the screen size is smaller then 768px it stays in the black header. As long as the site is wide 768 the navbar appear in row outside the black header. I want this nav to always stay in the black header and not change style when screen is larger then 768px. How do I do this?

I played around with the media quires of 768, but nothing seems to work..

You can try like this

@media only screen and (min-width: 768px) {
   //Put some css here that will make nav to stay in the black header
} 

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM