I am learning the code in post (https://stackoverflow.com/a/24811368/12214867)
<style>
.menu {
display: none;
}
.menu.opened {
display: block;
}
</style>
according to a comment on that post, the .menu
part in .menu.opened
is not needed technically, so I tried
<style>
.menu {
display: none;
}
.opened {
display: block;
}
</style>
works well just as before.
So, what is the difference between .menu.opened
and .opened
, when should I use which?