javascript - How to superimpose 2 img without changing Bootstrap position -
i superimpose 2 img without changing bootstrap position of, in fact here section when superimposing 2 images :
when hover, second img revealed jquery :
but like position, bootstrap (i'm using .col-md-3) :
here html code :
<section id="service"> <div class="row"> <div class="wow fadeinleft title" align="center"> provide </div> <div class="col-md-3 wow fadein insurance" align="center"> <img class="bottom" src="img/insurancehovr.png" alt="insurancehovr"> <img class="top" src="img/insurance.png" alt="insurance"> <div class="wow fadeindown insurancetxt" align="center"> <p>insurance</p> </div> </div> <div class="col-md-3 wow fadein quality" align="center"> <img src="img/quality.png" alt="quality"> <div class="wow fadeindown qualitytxt" align="center"> <p>quality</p> </div> </div> <div class="clearfix visible-xs-block"></div> <div class="col-md-3 wow fadein fast" align="center"> <img src="img/fast.png" alt="fast"> <div class="wow fadeindown fasttxt" align="center"> <p>delivery fast</p> </div> </div> <div class="col-md-3 wow fadein support" align="center"> <img src="img/support.png" alt="support"> <div class="wow fadeindown supporttxt" align="center"> <p>support</p> </div> </div> </div> </section>
here css code :
/* insurance hover */ #service .insurance { position:relative; -webkit-animation-delay: 1.5s; -moz-animation-delay: 1.5s; -o-animation-delay: 1.5s; -ms-animation-delay: 1.5s; zoom: 90%; padding-top: 50px; font-size: 30px; } #service .insurancetxt { -webkit-animation-delay: 1.8s; -moz-animation-delay: 1.8s; -o-animation-delay: 1.8s; -ms-animation-delay: 1.8s; -webkit-transition: opacity 0.15s ease-in-out; -moz-transition: opacity 0.15s ease-in-out; -o-transition: opacity 0.15s ease-in-out; transition: opacity 0.15s ease-in-out; color: #979696; font-size: 27px; padding-top: 10px; } #service .insurance img { position:absolute; left:0; -webkit-transition: opacity 0.10s ease-in-out; -moz-transition: opacity 0.10s ease-in-out; -o-transition: opacity 0.10s ease-in-out; transition: opacity 0.10s ease-in-out; } #service img.bottom { opacity: 0; }
here jquery code :
$(".top").mouseenter(function() { $(this).fadeto(0.05, 0); $(".bottom").fadeto(0.10, 1); $(".insurancetxt").css('color', 'white'); }); $(".top").mouseleave(function() { $(this).fadeto(0.10, 1); $(".bottom").fadeto(0.05, 0); $(".insurancetxt").css('color', '#979696'); });
Comments
Post a Comment