为动画添加时间延迟并重定向到下一张图片
add time delay to animate and redirect to next image
我用过animate.css做动画
如何添加时间延迟,使其动画几毫秒并缓慢重定向到定向的下一页
<div class="row-fluid" id="animatetransport">
<div id="industry" class="leftbg col-sm-6 col-xs-6" style="height: 100%">
<div class="imgwrapperleft">
<h1 id="industry" class="text-center">INDUSTRY</h1>
<!--<a href="industry/index.html"> <img src="images/factory.png" class="img-responsive"></a>-->
</div>
</div>
<img src="images/logo.png" class="logo">
<div class="rightbg col-sm-6 col-xs-6" style="height: 100%; ">
<div class="imgwrapperright">
<h1 id="transport" class="text-center">TRANSPORTATION</h1>
<!--<a href="industry/index.html"><img src="images/excavator.png" class="img-responsive"></a>-->
</div>
</div>
</div>
<script type="text/javascript">
$(document).ready(function(){
$("#transport").click(function(){
/*alert("The paragraph was clicked.");*/
$('#animatetransport').addClass( "animated slideInLeft" ).delay( 8000 );
window.location.href = "industry/index.html";
});
});
</script>
<script type="text/javascript">
$(document).ready(function(){
$("#industry").click(function(){
/*alert("The paragraph was clicked.");*/
$('#animatetransport').addClass( "animated slideInLeft" );
window.location.href = "industry/index.html";
});
});
</script>
如果您将 window.location.href
更改放入 setTimeout 中,它将延迟指定的毫秒数。
setTimeout(function(){ window.location.href = "industry/index.html"}, 500);
为此目的使用 setTimeout
。
$('#animatetransport').addClass( "animated slideInLeft" );
setTimeout(function() {
window.location.href = "industry/index.html";
}, 8000);
我用过animate.css做动画
如何添加时间延迟,使其动画几毫秒并缓慢重定向到定向的下一页
<div class="row-fluid" id="animatetransport">
<div id="industry" class="leftbg col-sm-6 col-xs-6" style="height: 100%">
<div class="imgwrapperleft">
<h1 id="industry" class="text-center">INDUSTRY</h1>
<!--<a href="industry/index.html"> <img src="images/factory.png" class="img-responsive"></a>-->
</div>
</div>
<img src="images/logo.png" class="logo">
<div class="rightbg col-sm-6 col-xs-6" style="height: 100%; ">
<div class="imgwrapperright">
<h1 id="transport" class="text-center">TRANSPORTATION</h1>
<!--<a href="industry/index.html"><img src="images/excavator.png" class="img-responsive"></a>-->
</div>
</div>
</div>
<script type="text/javascript">
$(document).ready(function(){
$("#transport").click(function(){
/*alert("The paragraph was clicked.");*/
$('#animatetransport').addClass( "animated slideInLeft" ).delay( 8000 );
window.location.href = "industry/index.html";
});
});
</script>
<script type="text/javascript">
$(document).ready(function(){
$("#industry").click(function(){
/*alert("The paragraph was clicked.");*/
$('#animatetransport').addClass( "animated slideInLeft" );
window.location.href = "industry/index.html";
});
});
</script>
如果您将 window.location.href
更改放入 setTimeout 中,它将延迟指定的毫秒数。
setTimeout(function(){ window.location.href = "industry/index.html"}, 500);
为此目的使用 setTimeout
。
$('#animatetransport').addClass( "animated slideInLeft" );
setTimeout(function() {
window.location.href = "industry/index.html";
}, 8000);