Susie
How do I make an susie?
What is a susie? How do you make a susie? This script and codes were developed by Susanne Karin Lundblad on 13 September 2022, Tuesday.
Susie - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Susie</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div class="wrapper"> <div class="sq sq0"></div> <div class="sq sq1"></div> <div class="sq sq2"></div> <div class="sq sq3"></div> <div class="sq sq4"></div> <div class="sq sq5"></div> <div class="sq sq6"></div> <div class="sq sq7"></div> <div class="sq sq9"></div> <div class="sq sq10"></div> <div class="sq sq11"></div> <div class="sq sq12"></div> <div class="sq sq13"></div> <div class="sq sq14"></div>
</div> <script src="js/index.js"></script>
</body>
</html>
Susie - Script Codes CSS Codes
* { margin: 0; padding: 0; outline: 0; border: 0;
}
html, body, .wrapper { display: block; width: 100%; height: 100%; background: #fff; -webkit-transform: translateZ(0); -moz-transform: translateZ(0); -ms-transform: translateZ(0); -o-transform: translateZ(0); transform: translateZ(0); overflow: hidden;
}
.sq { display: block; width: 920px; height: 920px; background: rgba(0,0,0,0.25); position: absolute; top: 0; left: 0; translate
}
.sq0 { background: url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/43234/suuuusanne1_1.png') center no-repeat; z-index: 99;
}
.sq1 { background: url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/43234/suuuusanne2_1.png') center no-repeat; z-index: 98;
}
.sq2 { background: url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/43234/suuuusanne3_1.png') center no-repeat; z-index: 97;
}
.sq3 { background: url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/43234/suuuusanne4_1.png') center no-repeat; z-index: 96;
}
.sq4 { background: url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/43234/suuuusanne5_1.png') center no-repeat; z-index: 95;
}
.sq5 { background: url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/43234/suuuusanne6_1.png') center no-repeat; z-index: 94;
}
.sq6 { background: url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/43234/suuuusanne7_1.png') center no-repeat; z-index: 93;
}
.sq7 { background: url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/43234/suuuusanne8_1.png') center no-repeat; z-index: 92;
}
.sq8 { background: url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/43234/suuuusanne10_1.png') center no-repeat; z-index: 91;
}
.sq9 { background: url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/43234/suuuusanne11_1.png') center no-repeat; z-index: 90;
}
.sq10 { background: url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/43234/suuuusanne12_1.png') center no-repeat; z-index: 89;
}
.sq11 { background: url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/43234/suuuusanne13_1.png') center no-repeat; z-index: 88;
}
.sq12 { background: url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/43234/suuuusanne14.png') center no-repeat; z-index: 87;
}
.sq13 { background: url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/43234/suuuusanne15.png') center no-repeat; z-index: 86;
}
.sq14 { background: url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/43234/suuuusanne15.png') center no-repeat; z-index: 85;
}
Susie - Script Codes JS Codes
// http://paulirish.com/2011/requestanimationframe-for-smart-animating/
// http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating
// requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel
// MIT license
(function() { var lastTime = 0; var vendors = ['ms', 'moz', 'webkit', 'o']; for(var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) { window.requestAnimationFrame = window[vendors[x]+'RequestAnimationFrame']; window.cancelAnimationFrame = window[vendors[x]+'CancelAnimationFrame'] || window[vendors[x]+'CancelRequestAnimationFrame']; } if (!window.requestAnimationFrame) window.requestAnimationFrame = function(callback, element) { var currTime = new Date().getTime(); var timeToCall = Math.max(0, 16 - (currTime - lastTime)); var id = window.setTimeout(function() { callback(currTime + timeToCall); }, timeToCall); lastTime = currTime + timeToCall; return id; }; if (!window.cancelAnimationFrame) window.cancelAnimationFrame = function(id) { clearTimeout(id); };
}());
var sqs = document.getElementsByClassName('sq');
var body = document.getElementsByTagName('body')[0];
var mousePos = {x: 0, y:0};
var delay = .5;
body.addEventListener('mousemove', function(e){ mousePos.x = e.clientX; mousePos.y = e.clientY;
},false);
body.addEventListener('touchstart', function(e){ mousePos.x = e.touches[0].clientX; mousePos.y = e.touches[0].clientY;
})
body.addEventListener('touchmove', function(e){ mousePos.x = e.touches[0].clientX; mousePos.y = e.touches[0].clientY;
})
function render() { //console.log('render. mousePos.x=',mousePos.x) for (var i = 0; i < sqs.length; i++) { var elLeft = parseFloat(sqs[i].style.left||0); var elTop = parseFloat(sqs[i].style.top||0); var leftDist = elLeft + 460 - mousePos.x; var topDist = elTop + 460 - mousePos.y; // console.log("leftDist: ", leftDist, 'mousePos.x',mousePos.x) sqs[i].style.left = elLeft - (leftDist / ( 1 + i*delay)) + "px"; sqs[i].style.top = elTop - (topDist / (1+ i*delay)) + "px"; } window.requestAnimationFrame(render);
}
window.requestAnimationFrame(render)
Developer | Susanne Karin Lundblad |
Username | SusanneLundblad |
Uploaded | September 13, 2022 |
Rating | 3 |
Size | 2,797 Kb |
Views | 26,312 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
A Pen by Susanne Karin Lundblad | 2,320 Kb |
Css man | 3,712 Kb |
AngularJS, submitting from input pushing enter | 2,219 Kb |
Button shaking | 2,227 Kb |
Css grid | 2,250 Kb |
Angular filter | 2,109 Kb |
Snow | 3,405 Kb |
CSS-masking gallery | 2,567 Kb |
Blend mode of text | 2,269 Kb |
Angular ng-click with ng-show, two buttons | 2,729 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
Michelle, submit your photography to Unsplash. | Zaneriley | 3,368 Kb |
Header | Er40 | 1,542 Kb |
Delete Hover | Chungman93 | 2,557 Kb |
Factorial | KeithleySLHS | 1,158 Kb |
Ipad Mini Showcase | Hornebom | 10,479 Kb |
Tumblr API | Juanv911 | 2,436 Kb |
Responsive scrolling text | Ashdurham | 2,259 Kb |
Horizontal scroll fixed element | HerrSerker | 0 Kb |
Update CSS Variables with JS | Wesbos | 2,335 Kb |
Css or Czz.. | Judag | 4,111 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!