how to have a jquery fade animation with html/css -
i trying come duplicate of this
i want duplicate flame icons. these appear in each section on far right or left away central container have text.
<section id="ourfires" class="portfolio page-section add-top add-bottom"> <!-- inner-section : starts --> <section class="inner-section"> <!-- container : starts --> <section class="container"> <div class="row"> <article class="col-md-12"> <h1 style="text-align:left;"><span class="animated" data-fx="bounceinright">our fire</span></h1> <article id="article"><hr class="hr"></hr></article> <div class="clearfix"></div> <div id="mid"> <p class="promod-text dark-text">our fire <b>big brand ideas</b> not have <b>edge in market</b> , make difference in <b>bottom line</b>,but ieas are: </p> <div> <ul id="navlist" class="promod-text dark-text" > <li>locally relevant</li> <li>creatively imagined , executed</li> <li>internationally recognized</li> </ul> </div> </div> </article> </div> </section> <!-- container : ends --> </section> <!-- inner-section : ends --> </div> </section>
#ourfires{ background-color:#ffffff; }
if want icon fade in when page arrive position of fire icon have use js because have know when icon on screen, js change class when icon on screen, animation css, idea change opacity
0 1 element want fade in , set transition
animate process, can use
var elementtoanimate = document.queryselector(".fire-icon"); var heightviewport = window.innerheight; function foundposition(){ /* scroll distance */ var desplaced = self.pageyoffset || document.documentelement.scrolltop; /* desplaced + half of viewport, animate icon when arrive half of screen */ var positionanimate = desplaced + (heightviewport / 2); if(elementtoanimate.offsettop < positionanimate){ elementtoanimate.classlist.add("animate-css"); } } onscroll = foundposition;
html, body, .big-div{ height: 100%; } .fire-icon{ opacity: 0; margin-left: 250px; -webkit-transition: 1s; transition: 1s; } .fire-icon.animate-css{ opacity: 1; margin-left: 0; }
scroll see animation <div class="big-div"></div> <div class="fire-icon"> <img src="http://static.wixstatic.com/media/d57153_09c71d3fe10848c3a04b18f8d8a6c2b3.png_srz_p_487_587_75_22_0.50_1.20_0.00_png_srz" alt=""/> </div> <div class="big-div"></div>
you can customize animation wish, above example illustrate, or can use animate.css.
you can see http://ksesocss.blogspot.com/2015/06/javascript-con-furoya-lazy-load-estoy.html lot.
Comments
Post a Comment