HTML/JavaScript |
Cole o código abaixo na segunda parte. Salvar. E por fim salvar organização.
<script language="JavaScript1.2">
<!--
var trailLength = 7
var path = "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxU7v_ULk7qNYqvOE33ZOxMqRxSc55jGbjmducXDngjUheV75TEpQHs_bRWMKQpfvD69JlfbtYydnZ0Qxjk8fv6CJM614ppJCnqDrWHnMr8RBIfPr43AEGS1A7Y01gANshaz4bY7ESAC4/s1600/cinnamoroll_11.gif"
var standardbody=(document.compatMode=="CSS1Compat")? document.documentElement : document.body
var i,d = 0
function initTrail() {
images = new Array()
for (i = 0; i < parseInt(trailLength); i++) {
images[i] = new Image()
images[i].src = path
}
storage = new Array()
for (i = 0; i < images.length*3; i++) {
storage[i] = 0
}
for (i = 0; i < images.length; i++) {
document.write('<div id="obj' + i + '" style="position: absolute; z-Index: 100; height: 0; width: 0"><img src="' + images[i].src + '"></div>')
}
trail()
}
function trail() {
for (i = 0; i < images.length; i++) {
document.getElementById("obj" + i).style.top = storage[d]+'px'
document.getElementById("obj" + i).style.left = + storage[d+1]+'px'
d = d+2
}
for (i = storage.length; i >= 2; i--) {
storage[i] = storage[i-2]
}
d = 0
var timer = setTimeout("trail()",20)
}
function processEvent(e) {
if (window.event) {
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
//-->
</script>
Ou se quiser outra imagem:
<script language="JavaScript1.2">
<!--
var trailLength = 7
var path = "COLE AQUI A URL DA IMAGEM"
var standardbody=(document.compatMode=="CSS1Compat")? document.documentElement : document.body
var i,d = 0
function initTrail() {
images = new Array()
for (i = 0; i < parseInt(trailLength); i++) {
images[i] = new Image()
images[i].src = path
}
storage = new Array()
for (i = 0; i < images.length*3; i++) {
storage[i] = 0
}
for (i = 0; i < images.length; i++) {
document.write('<div id="obj' + i + '" style="position: absolute; z-Index: 100; height: 0; width: 0"><img src="' + images[i].src + '"></div>')
}
trail()
}
function trail() {
for (i = 0; i < images.length; i++) {
document.getElementById("obj" + i).style.top = storage[d]+'px'
document.getElementById("obj" + i).style.left = + storage[d+1]+'px'
d = d+2
}
for (i = storage.length; i >= 2; i--) {
storage[i] = storage[i-2]
}
d = 0
var timer = setTimeout("trail()",20)
}
function processEvent(e) {
if (window.event) {
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
//-->
</script>