简体   繁体   English

如何在 html 和 css 中制作固定顶部菜单?

[英]How to make a fixed top menu in html and css?

I made a top menu which has a photo on the left and 3 nav links on the right.I made the nav links and the photo fixed but not the color from the background.How can I make the background color fixed too???我做了一个顶部菜单,左边有一张照片,右边有 3 个导航链接。我做了导航链接和照片固定,但没有背景颜色。我怎样才能固定背景颜色???

PS:I don t thing is worth sharing the code because is a mess. PS:我不值得分享代码,因为它是一团糟。

here is how to ask a good question:这是如何提出一个好问题的方法:

https://stackoverflow.com/help/how-to-ask https://stackoverflow.com/help/how-to-ask

here is how you can achieve a fixed footer and header这是实现固定页脚和 header 的方法

https://www.freecodecamp.org/news/how-to-keep-your-footer-where-it-belongs-59c6aa05c59c/ https://www.freecodecamp.org/news/how-to-keep-your-footer-where-it-belongs-59c6aa05c59c/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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