CSS Portal
Run
Search
« Back to
HTML onmouseout Event Attribute
<!DOCTYPE html> <html> <head> <title>onmouseout event</title> <style> img { width: 60px; height: 60px; } </style> </head> <body> <p>To demonstrate the onmouseout event attribute, hover over the image:</p> <img onmouseover="enlarge(this)" onmouseout="normal(this)" src="2.png" alt="CSS"> <p>After you remove the mouse pointer from the image, a script will be run that is set to the onmouseout event attribute, which will return the original image size.</p> <script> function enlarge(x) { x.style.height="120px"; x.style.width="120px"; } function normal(x) { x.style.height="60px"; x.style.width="60px"; } </script> </body> </html>
If this site has been useful, we’d love your support! Running this site takes time and resources, and every small contribution helps us keep creating valuable content. Consider buying us a coffee to keep things going strong!
☕ Buy a Coffee