Olá gostaria de saber se da pra duplicar imagens em javascript,gostaria de fazer uma animação com as imagens duplicadas no tamanho menor ate forma uma imagem grande…
Cara não entendi, se era isso que você queria.
Mas, tem esse código que achei.
< img src="caminho da imagem que desejas aumentar jpg, png etc" width="150" height="150" name="aumentar_imagem"
onmouseover="aumentar_imagem.width='300';aumentar_imagem.height='300';"
onmouseout="aumentar_imagem.width='150';aumentar_imagem.height='150';" / >
O que ele faz.
Quando você passar o muse sobre ele. Ele aumenta a imagem. Bem bacana.
Tenta explicar melhor.
Held, tenta usar sprites pra fazer a animação entre imagens diferentes, se for apenas pra alterar o tamanho presumo que usando css com uma funcao de controle de tempo resolveria o problema, tipo setInterval ou setTimeout.
html {
overflow: hidden;
}
body {
margin: 0px;
padding: 0px;
background: #222;
position: absolute;
width: 100%;
height: 100%;
}
#imgbox {
position: absolute;
overflow: hidden;
}
#imgbox div {
position: absolute;
cursor: pointer;
}
#imgbox img {
position: absolute;
-ms-interpolation-mode:nearest-neighbor;
}
#txtbox {
position: absolute;
visibility: hidden;
overflow: hidden;
background: #333;
color: #FFF;
font-family: verdana;
font-size: 0.8em;
}
Awaken from my nap by the river
Its transparency was hypnotizing.
Currents of cold water played with light.
I threw a few nuts into the river. They floated for a while, then sank in.
A wide stepping stone masked the water's depth.
Later on, I had a glimpse of the river's bed.
The wheelchair made a noise. Again, I had forgotten about my legs.
Still, I floated in oblivion of things too real.
I stared fixedly at the water's open arms. The stream was singing for me.
<div id="imgbox"></div>
<div id="txtbox">
<div style="margin:2%">
<h2>IMGBOX</h2>Click the thumbnails on the left for a larger image. The description connected to the clicked image is displayed here.<br>
<br>Note: for performance reasons, images are not resized and must be all of the same size.
</div>
</div>
the river
Awaken from my nap by the river
transparency
Its transparency was hypnotizing.
cold
Currents of cold water played with light.
sank in
I threw a few nuts into the river. They floated for a while, then sank in.
masked
A wide stepping stone masked the water's depth.
a glimpse
Later on, I had a glimpse of the river's bed.
forgotten
The wheelchair made a noise. Again, I had forgotten about my legs.
floated
Still, I floated in oblivion of things too real.
for me
I stared fixedly at the water's open arms. The stream was singing for me.
Loading…
alguem manja explicar esse enorme codigo rsrsrs…