gpt4 book ai didi

jQuery 幻灯片 div

转载 作者:行者123 更新时间:2023-11-28 13:34:34 29 4
gpt4 key购买 nike

我喜欢jQuery的幻灯片效果,当你move a cursor on some of products

我正在尝试使用类似的功能实现相同的效果,但有一个区别 - 当我在框上移动光标时,我想显示带有信息的新 DIV(这对我有用),但我想将其显示为从下到上的幻灯片,与链接地址上的完全一样。

$('div.box_data').hover( function() {
$(this).find('div.box_data_info').toggle();
});

如何添加幻灯片效果?

最佳答案

参见http://jsfiddle.net/ePSdq/

html.

<div class="box_data">
<div class="box_data_info">
<p> Loren ipsum....</p>
</div>
</div>

CSS

.box_data{
position:relative;
height:200px;
background-color:Red;
overflow:hidden;
}
.box_data_info{
position:absolute;
bottom:-100px;
height:80px;
background-color:#000;
color:#fff;
padding:10px;
width:100%;
}​

js.

$(function(){$('div.box_data').hover( function() {
$(this).find('div.box_data_info').stop().animate({bottom:0},500);
},
function() {
$(this).find('div.box_data_info').stop().animate({bottom: -100}, 200);
});
});

关于jQuery 幻灯片 div,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10243042/

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