I have a HTML section element which is defined as below:
<section class="sectionClass">
<h2>
some text
</h2>
</section>
.sectionClass {
h2 {
display:none;
}
}
Now, when the page loads the h2 is not displayed which is obvious. Now, I want that when I hover on the section the h2 is displayed and then when I dont hover then it hides. How can I do that using LESS?
UPDATE:
I added the following code but it does not show the h2 element even when I hover on the section.
.sectionClass :hover {
h2 {
display:block;
}
}