You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

82 lines
2.7 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>a and a</title>
<link rel="stylesheet" type="text/css" href="start.css" />
<link href="https://fonts.googleapis.com/css2?family=Nunito:wght@700&display=swap" rel="stylesheet">
<style type="text/css">BODY {overflow-x: hidden;}</style>
</head>
<body>
<div class="topnav">
<a class="active" href="index.html">Home</a>
<a href="navigation/project.html">Project</a>
<a href="navigation/about.html">About*</a>
<div class="sun"> <img src="subpages/design/corner.jpg"> </div>
</div>
<h1 align="center">
a <a href="subpages/catlion.html"><img src="crop/catlion.gif"></a> and a <a href="subpages/bookpen.html"><img src="crop/lioncat.gif"></a>
</h1>
<div class="grass"> <img src="subpages/design/grass.png"> </div>
</body>
<script language="JavaScript1.2">
var trailLength = 8 // The length of trail (8 by default; put more for longer "tail")
var path = "cloud.png" // URL of your image
var standardbody=(document.compatMode=="CSS1Compat")? document.documentElement : document.body //create reference to common "body" across doctypes
var i,d = 0
function initTrail() { // prepares the script
images = new Array() // prepare the image array
for (i = 0; i < parseInt(trailLength); i++) {
images[i] = new Image()
images[i].src = path
}
storage = new Array() // prepare the storage for the coordinates
for (i = 0; i < images.length*3; i++) {
storage[i] = 0
}
for (i = 0; i < images.length; i++) { // make divs for IE and layers for Navigator
document.write('<div class="mouse" id="obj' + i + '" style="position: absolute; z-Index: 100; height: 0; width: 0"><img src="' + images[i].src + '"></div>') }
trail()
}
function trail() { // trailing function
for (i = 0; i < images.length; i++) { // for every div/layer
document.getElementById("obj" + i).style.top = storage[d]+'px' // the Y-coordinate
document.getElementById("obj" + i).style.left = + storage[d+1]+'px' // the X-coordinate
d = d+2
}
for (i = storage.length; i >= 2; i--) { // save the coordinate for the div/layer that's behind
storage[i] = storage[i-2]
}
d = 0 // reset for future use
var timer = setTimeout("trail()",10) // call recursively
}
function processEvent(e) { // catches and processes the mousemove event
if (window.event) { // for IE
storage[0] = window.event.y+standardbody.scrollTop+10
storage[1] = window.event.x+standardbody.scrollLeft+10
} else {
storage[0] = e.pageY+12
storage[1] = e.pageX+12
}
}
initTrail()
document.onmousemove = processEvent // start capturing
//-->
</script>