https://codepen.io/desbear96/pen/Gxrzry
了解transition delay來創造進場動畫
透過Waypoint的js產生滾動過程中的動態效果
並再次強調zindex的應用來帶出hero image中的圖層順序
並於此次帶出inline-block垂直置中的實作方式
https://cl.ly/qIfb/hero-flower.png
https://cl.ly/qHo7/vintage.png
https://cl.ly/qHsB/vintage-up.png
https://cl.ly/qHcj/illustration-up.png
https://cl.ly/qHMB/illustration.png
jQuery(document).ready(function(){
jQuery(‘body’).imagesLoaded(function (){
jQuery(‘.os’).addClass(‘ready’);
function onScrollInit( items, trigger ) {
items.each( function() {
var osElement = jQuery(this)
var osTrigger = ( trigger ) ? trigger : osElement;
osTrigger.waypoint(function() {
osElement.removeClass(‘animate’);
},{
triggerOnce: true,
offset: ‘50%’
});
});
}
onScrollInit( jQuery(‘.os’) );
});
});
$bgC:#F3D5D7;
$color:#CE4D5A;
script(src=”https://cl.ly/q6Ke/jquery.min.js")
script(src=”https://cl.ly/qI9e/imagesloaded.pkgd.min.js")
script(src=”https://cl.ly/qI1b/jquery.waypoints.min.js")
script(src=”https://cl.ly/qIja/inview.js")