gpt4 book ai didi

jquery - 带有比例jquery的悬停功能

转载 作者:行者123 更新时间:2023-11-28 12:52:04 25 4
gpt4 key购买 nike

我不知道这里出了什么问题。

我做了这个 fiddle :http://jsfiddle.net/iBertel/dyNxs/

通过添加一个jquery的中转脚本解决。你可以在这里下载一个:http://ricostacruz.com/jquery.transit/

HTML

<section class="slider-panel red-background">
<div class="slider-caption-wrap">
<div class="rollOver"> <span class="rollOverSymbol">x</span>
<span class="rollOverSymbolBG"></span>

</div>
</div>
</section>

CSS

.slider-caption-wrap {
background-color: #333;
width:20%;
height: 20%;
position: absolute;
overflow: hidden;
bottom: 15%;
left:15%;
}
.rollOver {
position: absolute;
z-index: 5;
width: 100%;
height: 100%;
background: url("../img/overlayDottyDark.png") repeat scroll 0px 0px rgba(200, 57, 59, 0.8);
overflow: hidden;
opacity: 0;
}
.rollOverSymbol {
position: absolute;
z-index: 5;
left: 50%;
top: 50%;
margin-left: -50px;
margin-top: -50px;
display: block;
height: 100px;
width: 100px;
background-color: rgb(148, 41, 43);
border-radius: 50% 50% 50% 50%;
text-align: center;
line-height: 100px;
font-size: 72px;
color: rgb(255, 255, 255);
}
.rollOverSymbolBG {
position: absolute;
z-index: 4;
left: 50%;
top: 50%;
margin-left: -60px;
margin-top: -60px;
display: block;
height: 120px;
width: 120px;
background-color: rgb(204, 72, 75);
border-radius: 50% 50% 50% 50%;
}

JQUERY

$(".slider-caption-wrap").hover(

function () {
$(".rollOver", this).css({
opacity: 1
});
$(".rollOverSymbolBG", this).stop().transition({
scale: 1
}, 1400, 'easeOutCirc');
$(".rollOverSymbol", this).stop().transition({
scale: 1,
rotate: '0deg'
}, 500, 'easeOutCirc');
},

function () {
$(".rollOverSymbolBG", this).stop().transition({
scale: 4
}, 600, 'easeOutCirc');
$(".rollOverSymbol", this).stop().transition({
scale: 2,
rotate: '-45deg'
}, 600, 'easeOutCirc');
$(".rollOver", this).stop().transition({
opacity: 0
}, 300);
});

最佳答案

我认为您还没有将 jquery.transit.js 文件附加到 fiddle ...

工作演示:- http://jsfiddle.net/dyNxs/2/

关于jquery - 带有比例jquery的悬停功能,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16866846/

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