<div class="scene"> <h1>Simple magic!</h1> <div class="magic"></div> </div> <script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script> //Скрипт js надо подключать здесь //Автор: Nikolay Talanov. @suez @font-face { src: url("https://s3-us-west-2.amazonaws.com/s.cdpn.io/142996/Anders.ttf"); font-family: test; } *, *:before, *:after { box-sizing: border-box; margin: 0; } html, body { font-size: 62.5%; height: 100%; overflow: hidden; } .scene { position: relative; height: 100%; background: #1d1f20; padding: 20rem; text-align: center; } h1 { position: relative; font-size: 8rem; text-transform: uppercase; font-family: test; color: #fff; z-index: 10; } .magic { z-index: 5; position: absolute; top: calc(50% - 10rem); left: calc(50% - 10rem); width: 20rem; height: 20rem; background: url("https://s3-us-west-2.amazonaws.com/s.cdpn.io/142996/hover-reveal.jpg") 50% 50% no-repeat fixed; background-size: cover; border-radius: 50%; } .check-out { z-index: 100; position: absolute; bottom: 1rem; left: 50%; transform: translateX(-50%); font-size: 2rem; color: #fff; font-family: test; } .check-out a { color: #ffaaaa; } $(document).ready(function() { var $magic = $(".magic"), magicWHalf = $magic.width() / 2; $(document).on("mousemove", function(e) { $magic.css({"left": e.pageX - magicWHalf, "top": e.pageY - magicWHalf}); }); }); Навигация по записям Set of effects for headers Dots effect