ToolypetMCP
intermediate4 minutescss

Responsive Navigation Bar

Build a responsive nav bar with flexbox layout, smooth transitions, shadow, and mobile hamburger animation.

navigationresponsiveflexboxanimationmobile

何时使用此配方

Every website needs a navigation bar. This recipe creates a professional nav that works on desktop and mobile with smooth animations and proper responsive behavior.

步骤

1

Flexbox Generator

试用此工具

Layout the nav structure

提示词:Generate flexbox CSS for a nav bar: row direction, space-between, center aligned items
2

Box Shadow Generator

试用此工具

Add scroll shadow indicator

提示词:Generate a bottom edge shadow for sticky nav: 0 2px 10px rgba(0,0,0,0.08)
3

Easing Generator

试用此工具

Smooth hover transitions

提示词:Generate a smooth cubic-bezier for 300ms nav link hover underline transition
4

Animation Generator

试用此工具

Hamburger menu animation

提示词:Generate hamburger-to-X animation: rotate lines 45deg and -45deg with middle line fade out over 300ms

常见问题

Sticky vs fixed navigation?

Sticky (position: sticky) is preferred. It stays in flow until scroll point, then sticks. Fixed (position: fixed) is always on top and takes space from layout, requiring padding workarounds.

Should mobile nav use a hamburger menu?

For 5+ nav items, yes. For 3-4 items, a bottom tab bar (like mobile apps) may be more usable. Test with your users — hamburger menus hide navigation and can reduce discoverability.

相关配方