Skip to main content
Correcting a statement
Source Link
TylerH
  • 21.1k
  • 72
  • 78
  • 105

In this particular example, you can use:

#container:hover #cube {
    background-color: yellow;   
}

This example only works since cube is a child of container. For more complicated scenarios, you'd need to use javascriptdifferent CSS, or use JavaScript.

In this particular example, you can use:

#container:hover #cube {
    background-color: yellow;   
}

This only works since cube is a child of container. For more complicated scenarios, you'd need to use javascript.

In this particular example, you can use:

#container:hover #cube {
    background-color: yellow;   
}

This example only works since cube is a child of container. For more complicated scenarios, you'd need to use different CSS, or use JavaScript.

added syntax highlighting
Source Link
KyleMit
  • 34.6k
  • 72
  • 488
  • 686

In this particular example, you can use:

#container:hover #cube {
    background-color: yellow;   
}
#container:hover #cube {
    background-color: yellow;   
}

This only works since cube is a child of container. For more complicated scenarios, you'd need to use javascript.

In this particular example, you can use:

#container:hover #cube {
    background-color: yellow;   
}

This only works since cube is a child of container. For more complicated scenarios, you'd need to use javascript.

In this particular example, you can use:

#container:hover #cube {
    background-color: yellow;   
}

This only works since cube is a child of container. For more complicated scenarios, you'd need to use javascript.

Source Link
Emmett
  • 14.2k
  • 12
  • 56
  • 82

In this particular example, you can use:

#container:hover #cube {
    background-color: yellow;   
}

This only works since cube is a child of container. For more complicated scenarios, you'd need to use javascript.