[英]Javascript Z-Index
I'm having a problem with a jquery snow falling effect and a nivo slider. 我遇到了jquery降雪效果和nivo滑块的问题。 The problem seems to be that the snow falls behind the slider images, so I'm guessing it has something to do with the z-index of the snow falling effect. 问题似乎是雪落在滑块图像后面,所以我猜它与降雪效果的z指数有关。
I don't know much about Javascript so am not sure how to change the z-index of it. 我不太了解Javascript,所以我不知道如何更改它的z-index。
Can anyone help with this? 有人能帮忙吗? Here is a link , I can post code if needed. 这是一个链接 ,我可以根据需要发布代码。
Thanks. 谢谢。 Al. 人。
You will fix the issue by using (of course you should apply it each time you create a new snow flakes...): 您将通过使用来解决问题(当然,每次创建新的雪花时都应该应用它...):
$("div:contains('❄')").css('z-index', 200);
Anyway, it's not a good solution. 无论如何,这不是一个好的解决方案。 I use it because each snow flake on the screen is with id flake
. 我使用它是因为屏幕上的每个雪花都是带有flake
。 I suggest you to set class name instead of id (or at least to set unique ids). 我建议你设置类名而不是id(或至少设置唯一ID)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.