0
有一个脚本,显示一些股利时页面滚动到低于1400(< 1400),如果超过1400 DIV是隐藏。但我需要该div显示不是由高度(1400),而是由div id和隐藏“停止”div。请你帮帮我。滚动到div的ID,堆叠后“停止” DIV ID隐藏(不smoth滚动)
<style>
#goSale {position:fixed;bottom:-300px;width:auto;height:auto;}
#goSale img {opacity:100;-moz-animation:blink normal 3s infinite ease-in-out;-webkit-animation:blink normal 3s infinite ease-in-out;
-ms-animation:blink normal 3s infinite ease-in-out;animation:blink normal 3s infinite ease-in-out;animation-iteration-count:5;-ms-animation-iteration-count:5;
-webkit-animation-iteration-count:5;-o-animation-iteration-count:5;border:0px;width:100px;height:auto;}
</style>
<script>
$(document).ready(function() {
$(window).scroll(function() {
if($(this).scrollTop() < 1400){
$('#goSale').stop().animate({
top: '65px'
}, 1);
}else{
$('#goSale').stop().animate({
top: '-100px'
}, 1); } });
$('#goSale').scroll(function() {
$('html, body').stop().animate({
scrollTop: 0
}, 1, function() {
$('#goSale').stop().animate({
top: '65px'
}, 1); }); }); });
</script>
<div id="goSale"><img src="img/pages/sale.png"></div>
例子:http://www.vichy.ho.ua - 右上角的黑色立方体和其他左侧和右侧右侧“滚动”的元素,如YouTube和其他...
我想你可以用这个制作小提琴。这就是将帮助我们和你们 – plonknimbuzz
https://stackoverflow.com/questions/2928275/jquery-hide-div – JSnewbie
@plonknimbuzz ... www.vichy.ho.ua--右上方的黑色立方体。 –