AIGPAIGP

CSS :has() Interactive Family Tree

P

Prompt

Create an interactive CSS playground that demonstrates the power of the :has() selector with a family tree. Each node indicates parent-child relationships visually. Click on any person to see how :has() affects styling (highlight descendants, ancestors, siblings). Use pure CSS transitions and explain each :has() usage in comments. Keep the design minimal, clean, and modern.

CODE PREVIEW

エディタを読み込み中…

AIとの対話に追加する一言

プロンプトと一緒にコピーして、AIがより正確に意図を汲み取れるようにします

このコードをそのまま使いたいので、CDNリンクも含めた完全なHTMLファイルとして出力してください。

初心者なので、各行にコメントを追加して、何をしているか説明してください。

このコードをWordPressのテーマに組み込む方法も教えてください。

動作確認済みのコードをお願いします。エラーが出る場合の対処法も含めて。

このインタラクティブプレイグラウンドは、CSS :has() セレクタの力を示しています。人物をクリックすると、:has() が先祖・兄弟・子孫を動的にハイライトします — スタイリングのためのJavaScriptロジックは一切なく、純粋なCSSトランジションのみで実現しています。

Prompt Overview

This interactive playground shows the power of the CSS :has() selector. Click on any person to see how :has() dynamically highlights ancestors, siblings, and descendants — all with pure CSS transitions and no JavaScript logic for styling.

Was this prompt helpful?

Comments

Comments appear after moderation

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

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

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

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

見る
Homeヘルプ