如何让img在悬停时消失?

0 html image

当用户将鼠标悬停在网页上时,如何使网页中的图像消失?

Ill*_*the 5

一点点CSS应该解决这个问题:

img:hover {
    display: none;
}
Run Code Online (Sandbox Code Playgroud)

显然,您需要指定唯一的ID或类(取决于您想要的行为).