How To make onclick css | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula gr√°tis
+ 2

How To make onclick css

Hello everybody. I Need help. How make onclick event on css. Situation: I made hidden div And another div named "button" I want make : if I Will click on button, hidden div after clicking change his property to visible

2nd Jan 2019, 9:25 AM
Daniil Timonov
Daniil Timonov - avatar
3 Respostas
+ 5
It is actually not possible with only CSS. But with help of JavaScript or jQuery, you can surely do that. code is given by –ė–≥–ĺ—Ä—Ć –Į–ļ–ĺ–≤–Ķ–Ĺ–ļ–ĺ In css you can use active property, but it is not exactly onclick.
2nd Jan 2019, 9:44 AM
Raj Chhatrala
Raj Chhatrala - avatar
+ 3
You could use only css pseudo element :target to achieve it.
2nd Jan 2019, 10:07 AM
Calvi’≤ - avatar
HTML: <div id="div1"> .... </div> <div onclick=f()> .... </div> JS: function f(){ document.getElementById("div1"); } "property" - the name of the property, "value" - the value of the property
2nd Jan 2019, 9:46 AM
–ė–≥–ĺ—Ä—Ć –Į–ļ–ĺ–≤–Ķ–Ĺ–ļ–ĺ
–ė–≥–ĺ—Ä—Ć –Į–ļ–ĺ–≤–Ķ–Ĺ–ļ–ĺ - avatar