GifproGifpro

コンテナクエリでレスポンシブに変化!カードUI実験場

VISTA DE CÓDIGO

エディタを読み込み中…
P

Prompt

Create an interactive playground demonstrating CSS Container Queries. The page should have a container with resizable width (via slider or dragged handle), and cards inside that change layout based on the container's width (not the viewport). Include at least two breakpoints (e.g., card width < 300px: stacked vertical layout; >= 300px: horizontal row with image left; >= 500px: horizontal with larger thumbnail and text). Use container-type: inline-size, container-name, and @container rules. Add a small preview panel showing current container width. Use a clean, modern design with subtle colors. No JS framework, pure HTML/CSS/JS.

このインタラクティブプレイグラウンドでは、CSS Container Queries の挙動を体験できます。従来のビューポート基準ではなく、親コンテナの幅に応じて要素のレイアウトが変化します。スライダーでコンテナ幅を調整すると、300px・500px のブレークポイントでカードが縦積み→横並び→大きなサムネイル付きに変化します。

¿Te resultó útil este prompt?

Comentarios

Los comentarios aparecen después de la moderación

この記事が役に立ったら投げ銭で応援

Apple Pay / Google Pay / カード (Visa/Mastercard/JCB/Amex) / Link / Alipay / WeChat Pay 対応 · Stripeで安全に決済

開発者が選ぶ最強ツール集

運営者が毎日使っているツール・ガジェット 6選

見る
Inicioヘルプ
コンテナクエリでレスポンシブに変化!カードUI実験場 | ギフプロ | ギフプロ