+ 2

New Challenge

Make a light bulb that can be switched On and off with a button on the web.

4th Jun 2017, 7:54 PM
Nomeh Uchenna Gabriel
Nomeh Uchenna Gabriel - avatar
4 Answers
+ 5
You can even do that with pure Css instead of using JS as implicitly suggested by @Giorgi Tsomaia, by using Css 'background-image' property and tip principle explained in my recent tutorial: https://code.sololearn.com/WHJcalsIWiiZ/?ref=app Or even so, with same tip, by drawing your light bulb with Html or Svg elements ^^
4th Jun 2017, 8:27 PM
visph
visph - avatar
+ 1
I mean with html,css,js
8th Jun 2017, 7:38 AM
Nomeh Uchenna Gabriel
Nomeh Uchenna Gabriel - avatar
0
well, you'll need to toggle between 2 images by changing the src of the img tag. is that what u need?
4th Jun 2017, 8:21 PM
comcoma
comcoma - avatar