Here i put a code to scroll image up and down automatically but i need to slow the speed and pause scrolling on mouse over .Please help me to solve my issue .
(在这里,我放置了一个代码来自动上下滚动图像,但是我需要降低速度并在鼠标悬停时暂停滚动。请帮助我解决问题。)
style tag is for style the back ground and inner image(样式标签用于样式化背景和内部图像)
to call background image and inner image:
(调用背景图片和内部图片:)
<img src="images/webdesign/pixo-mob.png" alt="">
</figure>
</div>
</div>
</div>
<script>
$(function () {
var $image = $('#image-autoscroll').children('img');
function animate_img() {
if ($image.css('top') == '0px') {
$image.animate({top: -($image.height()-485)+"px"}, $image.height()*5, function () {
animate_img();
});
} else {
$image.animate({top: '0px'}, $image.height()*5, function () {
animate_img();
});
}
}
animate_img();
});
</script>
<style>
.phone-style .phone {
background: url(../images/webdesign/phone.png) no-repeat;
max-width: 283px;
width: 100%;
background-size: 100%;
height: 471px;
margin: 0 auto;
overflow: hidden;
padding: 84px 41px 99px 32px;
}
.phone-style .macbook, .phone-style .phone, .phone-style .tablt {
z-index: 9999;
cursor: not-allowed;
box-sizing: border-box;
}
.phone-style .device {
width: 100%;
height: 100%;
}
.phone-style #filter, .phone-style .device {
display: block;
overflow: hidden;
}
#image-autoscroll > img {
position : relative;
}
ask by Aishah Aishu translate from so
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…