+ 1
Can we add commands inside selectors using CSS property?
3 Respuestas
+ 5
You can do that by only using CSS but it's a little tricky and i defintely recommend to use Javascript as stated by Ulisses.
Just a simple implementation: https://code.sololearn.com/W9gxz1214xQq/?ref=app
0
HTML CODE:
<img id="image" url of image here>
<p id ="h"> hello </p>
---------------------------------------
CSS CODE:
#image: hover { what should I write here to change value of "hello" to "world"? }
0
To do that you need JavaScript