jQuery
【jQuery】指定した要素を画面スクロールに追従させるjQuery Simple Scroll Follow
December 18, 2018

jQuery Simple Scroll Followは指定した要素を画面スクロールに追従させる
HTML
<aside>Element to follow</aside>
<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script> <script src="jquery.simple-scroll-follow.min.js"></script>
CSS
aside { position: absolute; }
JavaScript
$('aside').simpleScrollFollow();
追尾する要素にはposition: absolute
が必須
CSS
body { background: url(null) fixed; }