Fade In div when it's scrolled into viewport
问题 Okay, so I've been searching for a simple way to fade in a div when a user scrolls it into view, but I can't find a straight solution. HTML <div class="container"> <div class="topdiv">This is a 100% height div. User scrolls down from here.</div> <div class="fadethisdiv">This content should be faded in once .fadethisdiv is [so many]px into the bottom of the viewport. Let's use 150px as an example.</div> </div> CSS .container { width:100%; height:600px; } .topdiv { height:100%; background-color