生病请假在家,硬是睡不着;闲来无事整理了下移动硬盘
翻出了个幽灵404单页
有浮动效果;小眼睛还会跟着鼠标动,挺可爱的一小东西
预览图
源码展示
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
| <!doctype html> <html> <head> <meta charset="utf-8"> <title>iCat - 幽灵404页面</title> <script type="text/javascript" src="yan.js"></script> <link rel="stylesheet" href="style.css"> </head> <body> <div class="box"> <div class="box__ghost"> <div class="symbol"></div> <div class="symbol"></div> <div class="symbol"></div> <div class="symbol"></div> <div class="symbol"></div> <div class="symbol"></div> <div class="box__ghost-container"> <div class="box__ghost-eyes"> <div class="box__eye-left"></div> <div class="box__eye-right"></div> </div> <div class="box__ghost-bottom"> <div></div> <div></div> <div></div> <div></div> <div></div> </div> </div> <div class="box__ghost-shadow"></div> </div> <div class="box__description"> <div class="box__description-container"> <div class="box__description-title">~ 404 ~</div> <div class="box__description-text">找不到你要的内容哦~</div> </div> <a href="https://meuicat.com/" class="box__button">返回</a> </div> </div> <script>
var pageX = $(document).width(); var pageY = $(document).height(); var mouseY=0; var mouseX=0; $(document).mousemove(function( event ) { mouseY = event.pageY; yAxis = (pageY/2-mouseY)/pageY*300; mouseX = event.pageX / -pageX; xAxis = -mouseX * 100 - 100; $('.box__ghost-eyes').css({ 'transform': 'translate('+ xAxis +'%,-'+ yAxis +'%)' }); });</script> </body> </html>
|
原作地址:https://dribbble.com/shots/3913847-404-page
下载地址