Remove the transparency/opacity of the <img> element when the user hovers over it with the mouse pointer. - HTML CSS CSS

HTML CSS examples for CSS:Quiz

Description

Remove the transparency/opacity of the <img> element when the user hovers over it with the mouse pointer.

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<head>
<style>
img {<!--from  w  w w.  j  a  v  a 2  s.c o  m-->
    opacity: 0.4;
}
img:hover {
    opacity: 1.0;
}
</style>
</head>
<body>

<img src="https://www.java2s.com/style/demo/Opera.png" width="150" height="113">

</body>
</html>

Related Tutorials