CSS question - DIV content change on hover
CSS question - DIV content change on hover
Out of context: Reply #4
- Started
- Last post
- 13 Responses
- dmay0
To change the content, you can switch the display of the title and the paragraph:
<div>
<p class="title">This is the Title</p>
<p class="paragraph">This is the Paragraph</p>
</div>div .title {
display: block;
}
div .paragraph {
display: none;
}
div:hover .title {
display: none;
}
div:hover .paragraph {
display: block;
}