Blink
by OwenMelbz
HTML
<div class="b1"></div>
<div class="b2"></div>
CSS
body {
background-image: url('http://attachments.techguy.org/attachments/66283d1129995795/desktop-screenshot-windows-installer-bootup.jpg');
background-size:100% auto;
background-repeat:no-repeat;
margin:0;
padding:0;
}
.b1, .b2 {
position: absolute;
width:100%;
height:50%;
background: black;
top:0;
left:0;
}
.b2 {
bottom:0;
top: auto;
}
}
JavaScript
$(function(){
var b1 = ($(window).height()/2)*-1;
$('.b1').css('top', b1);
var b2 = ($(window).height()/2)*-1;
$('.b2').css('bottom', b1);
var blink = setInterval(function(){
$('.b1').animate({'top':0}, {duration: 100, queue: false, complete: function(){
$('.b1').animate({'top':b1}, 100);
}});
$('.b2').animate({'bottom':0}, {duration: 100, queue: false, complete: function(){
$('.b2').animate({'bottom':b2}, 100);
}});
}, 5000);
});