ToolypetMCP
beginner3 minutescss

Card Component Style

Build a modern card component with shadow, border radius, hover transform, and smooth transitions.

cardshadowborder-radiustransform

何时使用此配方

Cards are one of the most common UI patterns. This recipe creates a card that feels interactive and polished, suitable for product listings, blog posts, or dashboard widgets.

步骤

1

Box Shadow Generator

试用此工具

Add Material Design-inspired shadow

提示词:Generate a card shadow: 0 1px 3px rgba(0,0,0,0.12) and 0 1px 2px rgba(0,0,0,0.24)
2

Border Radius Generator

试用此工具

Round the card corners

提示词:Generate 12px border radius for all corners
3

Transform Generator

试用此工具

Create lift-on-hover effect

提示词:Generate translateY(-4px) transform for hover state
4

Easing Generator

试用此工具

Smooth the hover transition

提示词:Generate a smooth ease-out cubic-bezier for 200ms transition

常见问题

Should I use box-shadow or drop-shadow for cards?

box-shadow is preferred for cards as it supports spread radius and multiple shadows. drop-shadow is better for irregular shapes.

How do I add a border on hover instead?

Replace the transform step with a border-color transition. Use border: 2px solid transparent transitioning to a visible color.

相关配方