CSS के साथ होवर पर किसी तत्व को प्रदर्शित करने के लिए, कोड इस प्रकार है -
उदाहरण
<!DOCTYPE html>
<html>
<head>
<style>
body{
margin:20px;
padding:20px;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
.hiddenText {
display: none;
}
.hoverDiv:hover + .hiddenText {
display: block;
color: rgb(71, 0, 65);
font-size: 22px;
font-weight: bold;
}
</style>
</head>
<body>
<h1>Display an Element on Hover Example</h1>
<div class="hoverDiv" style="font-size: 18px;">Hover over me.</div>
<div class="hiddenText">This text is shown by hovering on the above div</div>
</body>
</html> आउटपुट
उपरोक्त कोड निम्न आउटपुट उत्पन्न करता है -

"मुझ पर होवर करें" टेक्स्ट पर होवर करने पर -
