0

Hide the span until something is typed?

Is there a way to hide the span until something is typed? https://code.sololearn.com/W24N68LyD1ho/?ref=app

14th Jun 2018, 3:29 AM
Daniel Cooper
Daniel Cooper - avatar
4 ответов
+ 1
Thanks!
14th Jun 2018, 6:11 AM
Daniel Cooper
Daniel Cooper - avatar
0
You can add this to your CSS: span:empty { display: none; } or "display: hidden;" if you want it to take up space. Hope this was what you were looking for! :)
14th Jun 2018, 5:08 AM
Janning⭐
Janning⭐ - avatar
0
Didn't know that was a pseudo element. Thanks! Is there a list of all of them somewhere?
14th Jun 2018, 5:22 AM
Daniel Cooper
Daniel Cooper - avatar
0
Sure thing! Commonly used ones here: https://www.w3schools.com/cssref/css_selectors.asp but sometimes the CSS specifications will add some more insights. https://www.w3.org/TR/selectors-3/ However, it also includes some selectors that browsers don't support yet, so it's generally a good idea to check browser support for each selector you actually want to use. :)
14th Jun 2018, 5:47 AM
Janning⭐
Janning⭐ - avatar