css transitions - How to animate using css and waypoints -
i have simple code
h2 { font-size: 4em; text-align: center; } h2:after { background: #aaa none repeat scroll 0 0; content: " "; display: block; height: 1px; margin: 1em auto; width: 120px; /*transition-property: width; transition-duration: 2s; transition-timing-function: linear; transition-delay: 1s;*/ transition: width 2s linear 1s; } i want underline animated once parent comes in contact viewport. here's html:
<article id="con" class="content"> <div class="container"> <div class="row"> <h2 data-animate="fadein">contact</h2> <h3>howdy!</h3> <p>want hello? need creative help? send me message…</p> </div> </div> </article> <script src="https://cdnjs.cloudflare.com/ajax/libs/waypoints/1.1.6/waypoints.min.js"></script> h2 { font-size: 4em; text-align: center; } h2:after { background: #aaa none repeat scroll 0 0; content: " "; display: block; height: 1px; margin: 1em auto; width: 120px; transition: width 2s linear 1s; } <div style="height:1300px; background:#eee;"></div> <article id="con" class="content"> <div class="container"> <div class="row"> <h2 data-animate="fadein">contact</h2> <h3>some heading</h3> <p>some text show, may dummy text or of sort. when moon emptyt water.</p> </div> </div> </article> "dummy text: submit question. lorem ipsum dummy text of printing , typesetting industry. lorem ipsum has been industry's standard dummy text ever since 1500s, when unknown printer took galley of type , scrambled make type specimen book. has survived not 5 centuries, leap electronic typesetting, remaining unchanged. popularised in 1960s release of letraset sheets containing lorem ipsum passages, , more desktop publishing software aldus pagemaker including versions of lorem ipsum."
Comments
Post a Comment