我正在学习本教程:http://tympanus.net/codrops/2013/06/18/caption-hover-effects/ .一步一步来,所以我知道我在做什么。我很惊讶地发现这个效果是用 css 完成的。
无论如何,我在 cs-style3 中卡在了这部分
.no-touch .cs-style-3 figure:hover figcaption,
.cs-style-3 figure.cs-hover figcaption {
opacity: 1;
transform: translateY(0px);
transition: transform 0.4s, opacity 0.1s;
}
什么是 .cs-hover?我搜索这是某种特殊的 css3 东西吗?因为它不是文件中的类。我无法让它工作。
我试图将鼠标悬停在 figure/img 上,而 figcaption 应该向上滑动。
我正在考虑尝试 figure:hover figcaption{} 但这也不起作用
最佳答案
如果您查看代码,您会发现它们包括 <script src="js/toucheffects.js"></script>
.这个脚本说:
// for touch devices: add class cs-hover to the figures when touching the items
关于jquery - 将鼠标悬停在图上并更改图标题?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18640875/