gpt4 book ai didi

jQuery 叠加闪烁

转载 作者:行者123 更新时间:2023-11-28 08:32:14 24 4
gpt4 key购买 nike

我遇到了一个图像覆盖的问题,它闪烁然后消失,我假设它与 css 加载覆盖然后 jQuery 触发有关?

.Image-Overlay {
width: 100%;
height: 100%;
background-color: rgba(0,0,0, 0.8);
z-index: 100;
display: none;
position: absolute;
top: 0;
cursor: pointer;
color: #fff;
box-sizing: border-box;
padding: 20px;
}
<div class="column xsmall-12 small-6 medium-3 overlay">
<img src="<?php echo get_template_directory_uri(); ?>
/img/insidePages/Layer90.jpg" alt="Kenya" />
<div class="Image-Overlay">
<p>content on overlay</p>
</div>
<h2>Title</h2>
</div>

$('.overlay').mouseenter(function () {
$('.Image-Overlay', this).fadeIn('slow');
}).mouseleave(function () {
$('.Image-Overlay', this).fadeOut('fast');
});

真的,我想要它在悬停时向上滑动叠加层,但我查看了 jQuery 网站并且效果不起作用,关于我哪里出错的任何提示?

最佳答案

你在找这样的东西吗:

Fiddle

$('.overlay').mouseenter(function () {
$('.Image-Overlay', this).slideDown('fast');
}).mouseleave(function () {
$('.Image-Overlay', this).slideUp('fast');
});

关于jQuery 叠加闪烁,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28214124/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com