Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我对悬停效果有疑问。当我将图像悬停时,一切正常,但是您的光标必须在整个动画中完全位于图像上。所以我需要将悬停区域从图像的开头扩展到动画图像的结尾。所以动画的每个部分都会被覆盖。
抱歉,我没有网络空间。因此,如果您相信我,您可以从 Dropbox 下载 .rar 文件。我保证我没有在那里种植任何病毒:)。只需启动 Meist.html,它就是页面的“索引”。尝试将鼠标悬停在页脚上方的咖啡杯上。
任何问题都扔掉,因为我的母语不是英语。
在图像周围放置填充
img { padding: 30px }
这会将图像周围的区域扩大 30 像素。确保使用填充而不是边距,因为边距不会使创建的空间可点击。
将图像放在一个 div 中,使用如下选择器:
#your_div:hover img { /* Do your stuff */ }