在使用转换函数时,如何使div元素淡出变慢?
$('.masthead').visibility({
once: false,
onBottomPassed: function() {
$('.fixed.menu').transition('fade in');
$('.fixed.menu').animate({
height: 80
}, 500); //animate the menu to the width of 80
},
onBottomPassedReverse: function() {
$('.fixed.menu').animate({
height: 50
}, 500); //animate the menu back to the original width
$('.fixed.menu').transition('fade out');
}
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div class="masthead">
<div id="fixed-menu">
</div>
</div>
发布于 2017-03-03 15:51:28
https://stackoverflow.com/questions/42582817
复制相似问题