Flexbox Responsive Card Gallery
Prompt
Create a responsive card gallery using Flexbox that automatically adjusts layout based on screen size. Cards should have equal height, proper spacing, and maintain alignment. Include hover effects and a filter functionality to show/hide cards by category.
CODE PREVIEW
AI rewrites this code based on your instructions. Preview is free; copy & download unlocked for ¥100.
AIとの対話に追加する一言
プロンプトと一緒にコピーして、AIがより正確に意図を汲み取れるようにします
このコードをそのまま使いたいので、CDNリンクも含めた完全なHTMLファイルとして出力してください。
初心者なので、各行にコメントを追加して、何をしているか説明してください。
このコードをWordPressのテーマに組み込む方法も教えてください。
動作確認済みのコードをお願いします。エラーが出る場合の対処法も含めて。
This tutorial demonstrates a responsive card gallery using Flexbox. The layout automatically adjusts based on screen size, showing 1 column on mobile, 2 columns on tablet, and 3 columns on desktop. Each card maintains equal height through flexbox properties, ensuring a clean, aligned appearance.
The filter functionality allows users to show/hide cards by category (Web, Design, Mobile). When filtering, cards smoothly fade out and scale down, then fade back in when selected. Hover effects provide visual feedback with subtle elevation and shadow changes.
Key Flexbox properties used include: display: flex, flex-wrap: wrap, flex: 1 1 300px (grow, shrink, basis), and justify-content: center. The flex-grow: 1 on paragraph elements ensures equal card heights regardless of content length.
Was this prompt helpful?
Comments
Comments appear after moderation
この記事が役に立ったら投げ銭で応援
Apple Pay / Google Pay / クレジットカード対応 · Stripeで安全に決済
開発者が選ぶ最強ツール集
運営者が毎日使っているツール・ガジェット 6選