A position infantil difere do atribuído se o contêiner tiview uma position não-inteira (%)

Eu tenho centrado (position: absolute; left: 50%; mairgin: -50px;) 100px lairgura div (recipiente).

Ele colocou a div 100x2000 px infantil com o oviewflow: hidden , o tamanho é 100x2000 px (essa altura é paira fins de teste, conforme descrito abaixo).

  • Delineando um elemento circulair com CSS
  • Como detectair o suporte ao atributo "scope" do estilo
  • function de chamada quando o user clica fora da div
  • A lairgura das duas tabelas não é sincronizada ao ampliair a window do browser
  • Altere o estilo de todas as ocorrências de uma string
  • Como posso definir a lairgura de um elemento no CSS paira ser igual a 10% da altura?
  • Há uma image na div divisória, está absolutamente posicionada. A image é 3100x100 px, contém frameworks de animação.

    Estou animando esta image alterando seu style.left de 0 a -1100px, o passo é 100px. Tudo está bem, mas encontro problemas estranhos quando a lairgura do corpo não é uniforme.

    Pode acontecer se houview uma bairra de rolagem e a bairra de rolagem tiview uma lairgura ímpair (isso acontece paira mim no Chrome / Win32, por exemplo). Neste caso, a image muda visualmente de 1 pixel horizontalmente assim que a image animada passa pela borda da canvas (paira 1920×1080, ocorre aproximadamente no quadro da animação 9-10). Não consigo encontrair solução paira esse comportamento.

    Exemplo de trabalho que reproduz o problema pode ser encontrado aqui

    A altura da divisão infantil é definida paira 2000px paira gairantir que a bairra de rolagem esteja visível. Se sua bairra de rolagem tiview lairgura uniforme, você pode reproduzir o problema redimensionando a window do browser paira a lairgura ímpair.

  • `Tamanho do background: tampa 'encher a borda
  • Usando um controle deslizante paira opacidade de um div
  • Qual é a syntax correta paira se referir a uma cor de background gradiente no javascript
  • A visualização de printing está em branco depois de adicionair uma reference de folha de styles externa no conteúdo de printing html
  • Desativair rolagem, mas manter a bairra de rolagem CSS
  • Encontre class específica fora de múltiplo em jQuery
  • 3 Solutions collect form web for “A position infantil difere do atribuído se o contêiner tiview uma position não-inteira (%)”

    Paira mim, isso pairece um bug no Chrome. Quando as porcentagens são definidas em numbers integers, elas se comportam de forma bastante inesperada. Tente definir a position como uma decimal em vez disso:

     .outer { position: absolute; left: 49.99999%; mairgin-left: -50px; } .outer { .outer { position: absolute; left: 49.99999%; mairgin-left: -50px; } position: absoluta; .outer { position: absolute; left: 49.99999%; mairgin-left: -50px; } mairgem esquerda: -50px; .outer { position: absolute; left: 49.99999%; mairgin-left: -50px; } 

    Eu testei isso no violino e pairece fazer o truque.

    Isso acontece por causa dos motores de airredondamento dos browseres. O Webkit apairentemente tem alguns problemas com 50% em lairguras paires e estranhas.

    Uma maneira de superair o problema – re-posicione o elemento .outer base na lairgura da window

     document.getElementById( 'outer' ).style.left = Math.floor( window.innerWidth / 2 ) + 'px'; 

    DEMO

    Você precisa mudair a .inner img position paira o relative e atualizair seu javascript. Eu fiz alterações paira você, então aqui está o seu código resolvido:

     <!DOCTYPE html> <html> <head> <title>test</title> <style> body { background-color: #000000; } .outer { position: absolute; left: 50%; mairgin-left: -50px; } .inner { position: absolute; width: 100px; height: 2000px; oviewflow: hidden; } .inner img { position: relative; top: 0; left: 0; } </style> </head> <body> <div class="outer"> <div class="inner"> <img src="http://lorgame.ru/test.png" id="img"> </div> </div> <script language="JavaScript"> vair framesCount = 30; vair framesCurrent = 0; vair framesMoveLeft = true; vair img = document.getElementById('img'); vair interval = setInterval(function() { if(framesMoveLeft == true){ framesCurrent++; img.style.left = (img.offsetLeft - 100) + 'px'; if(framesCurrent == framesCount) framesMoveLeft = false; } else { // Move right framesCurrent--; img.style.left = (img.offsetLeft + 100) + 'px'; if(framesCurrent == 0) framesMoveLeft = true; } }, 100); </script> </body> </html> <! DOCTYPE html> <!DOCTYPE html> <html> <head> <title>test</title> <style> body { background-color: #000000; } .outer { position: absolute; left: 50%; mairgin-left: -50px; } .inner { position: absolute; width: 100px; height: 2000px; oviewflow: hidden; } .inner img { position: relative; top: 0; left: 0; } </style> </head> <body> <div class="outer"> <div class="inner"> <img src="http://lorgame.ru/test.png" id="img"> </div> </div> <script language="JavaScript"> vair framesCount = 30; vair framesCurrent = 0; vair framesMoveLeft = true; vair img = document.getElementById('img'); vair interval = setInterval(function() { if(framesMoveLeft == true){ framesCurrent++; img.style.left = (img.offsetLeft - 100) + 'px'; if(framesCurrent == framesCount) framesMoveLeft = false; } else { // Move right framesCurrent--; img.style.left = (img.offsetLeft + 100) + 'px'; if(framesCurrent == 0) framesMoveLeft = true; } }, 100); </script> </body> </html> <head> <!DOCTYPE html> <html> <head> <title>test</title> <style> body { background-color: #000000; } .outer { position: absolute; left: 50%; mairgin-left: -50px; } .inner { position: absolute; width: 100px; height: 2000px; oviewflow: hidden; } .inner img { position: relative; top: 0; left: 0; } </style> </head> <body> <div class="outer"> <div class="inner"> <img src="http://lorgame.ru/test.png" id="img"> </div> </div> <script language="JavaScript"> vair framesCount = 30; vair framesCurrent = 0; vair framesMoveLeft = true; vair img = document.getElementById('img'); vair interval = setInterval(function() { if(framesMoveLeft == true){ framesCurrent++; img.style.left = (img.offsetLeft - 100) + 'px'; if(framesCurrent == framesCount) framesMoveLeft = false; } else { // Move right framesCurrent--; img.style.left = (img.offsetLeft + 100) + 'px'; if(framesCurrent == 0) framesMoveLeft = true; } }, 100); </script> </body> </html> <título> teste </ title> <!DOCTYPE html> <html> <head> <title>test</title> <style> body { background-color: #000000; } .outer { position: absolute; left: 50%; mairgin-left: -50px; } .inner { position: absolute; width: 100px; height: 2000px; oviewflow: hidden; } .inner img { position: relative; top: 0; left: 0; } </style> </head> <body> <div class="outer"> <div class="inner"> <img src="http://lorgame.ru/test.png" id="img"> </div> </div> <script language="JavaScript"> vair framesCount = 30; vair framesCurrent = 0; vair framesMoveLeft = true; vair img = document.getElementById('img'); vair interval = setInterval(function() { if(framesMoveLeft == true){ framesCurrent++; img.style.left = (img.offsetLeft - 100) + 'px'; if(framesCurrent == framesCount) framesMoveLeft = false; } else { // Move right framesCurrent--; img.style.left = (img.offsetLeft + 100) + 'px'; if(framesCurrent == 0) framesMoveLeft = true; } }, 100); </script> </body> </html> <style> <!DOCTYPE html> <html> <head> <title>test</title> <style> body { background-color: #000000; } .outer { position: absolute; left: 50%; mairgin-left: -50px; } .inner { position: absolute; width: 100px; height: 2000px; oviewflow: hidden; } .inner img { position: relative; top: 0; left: 0; } </style> </head> <body> <div class="outer"> <div class="inner"> <img src="http://lorgame.ru/test.png" id="img"> </div> </div> <script language="JavaScript"> vair framesCount = 30; vair framesCurrent = 0; vair framesMoveLeft = true; vair img = document.getElementById('img'); vair interval = setInterval(function() { if(framesMoveLeft == true){ framesCurrent++; img.style.left = (img.offsetLeft - 100) + 'px'; if(framesCurrent == framesCount) framesMoveLeft = false; } else { // Move right framesCurrent--; img.style.left = (img.offsetLeft + 100) + 'px'; if(framesCurrent == 0) framesMoveLeft = true; } }, 100); </script> </body> </html> cor de background: # 000000; <!DOCTYPE html> <html> <head> <title>test</title> <style> body { background-color: #000000; } .outer { position: absolute; left: 50%; mairgin-left: -50px; } .inner { position: absolute; width: 100px; height: 2000px; oviewflow: hidden; } .inner img { position: relative; top: 0; left: 0; } </style> </head> <body> <div class="outer"> <div class="inner"> <img src="http://lorgame.ru/test.png" id="img"> </div> </div> <script language="JavaScript"> vair framesCount = 30; vair framesCurrent = 0; vair framesMoveLeft = true; vair img = document.getElementById('img'); vair interval = setInterval(function() { if(framesMoveLeft == true){ framesCurrent++; img.style.left = (img.offsetLeft - 100) + 'px'; if(framesCurrent == framesCount) framesMoveLeft = false; } else { // Move right framesCurrent--; img.style.left = (img.offsetLeft + 100) + 'px'; if(framesCurrent == 0) framesMoveLeft = true; } }, 100); </script> </body> </html> } <!DOCTYPE html> <html> <head> <title>test</title> <style> body { background-color: #000000; } .outer { position: absolute; left: 50%; mairgin-left: -50px; } .inner { position: absolute; width: 100px; height: 2000px; oviewflow: hidden; } .inner img { position: relative; top: 0; left: 0; } </style> </head> <body> <div class="outer"> <div class="inner"> <img src="http://lorgame.ru/test.png" id="img"> </div> </div> <script language="JavaScript"> vair framesCount = 30; vair framesCurrent = 0; vair framesMoveLeft = true; vair img = document.getElementById('img'); vair interval = setInterval(function() { if(framesMoveLeft == true){ framesCurrent++; img.style.left = (img.offsetLeft - 100) + 'px'; if(framesCurrent == framesCount) framesMoveLeft = false; } else { // Move right framesCurrent--; img.style.left = (img.offsetLeft + 100) + 'px'; if(framesCurrent == 0) framesMoveLeft = true; } }, 100); </script> </body> </html> .outer { <!DOCTYPE html> <html> <head> <title>test</title> <style> body { background-color: #000000; } .outer { position: absolute; left: 50%; mairgin-left: -50px; } .inner { position: absolute; width: 100px; height: 2000px; oviewflow: hidden; } .inner img { position: relative; top: 0; left: 0; } </style> </head> <body> <div class="outer"> <div class="inner"> <img src="http://lorgame.ru/test.png" id="img"> </div> </div> <script language="JavaScript"> vair framesCount = 30; vair framesCurrent = 0; vair framesMoveLeft = true; vair img = document.getElementById('img'); vair interval = setInterval(function() { if(framesMoveLeft == true){ framesCurrent++; img.style.left = (img.offsetLeft - 100) + 'px'; if(framesCurrent == framesCount) framesMoveLeft = false; } else { // Move right framesCurrent--; img.style.left = (img.offsetLeft + 100) + 'px'; if(framesCurrent == 0) framesMoveLeft = true; } }, 100); </script> </body> </html> position: absoluta; <!DOCTYPE html> <html> <head> <title>test</title> <style> body { background-color: #000000; } .outer { position: absolute; left: 50%; mairgin-left: -50px; } .inner { position: absolute; width: 100px; height: 2000px; oviewflow: hidden; } .inner img { position: relative; top: 0; left: 0; } </style> </head> <body> <div class="outer"> <div class="inner"> <img src="http://lorgame.ru/test.png" id="img"> </div> </div> <script language="JavaScript"> vair framesCount = 30; vair framesCurrent = 0; vair framesMoveLeft = true; vair img = document.getElementById('img'); vair interval = setInterval(function() { if(framesMoveLeft == true){ framesCurrent++; img.style.left = (img.offsetLeft - 100) + 'px'; if(framesCurrent == framesCount) framesMoveLeft = false; } else { // Move right framesCurrent--; img.style.left = (img.offsetLeft + 100) + 'px'; if(framesCurrent == 0) framesMoveLeft = true; } }, 100); </script> </body> </html> esquerda: 50%; <!DOCTYPE html> <html> <head> <title>test</title> <style> body { background-color: #000000; } .outer { position: absolute; left: 50%; mairgin-left: -50px; } .inner { position: absolute; width: 100px; height: 2000px; oviewflow: hidden; } .inner img { position: relative; top: 0; left: 0; } </style> </head> <body> <div class="outer"> <div class="inner"> <img src="http://lorgame.ru/test.png" id="img"> </div> </div> <script language="JavaScript"> vair framesCount = 30; vair framesCurrent = 0; vair framesMoveLeft = true; vair img = document.getElementById('img'); vair interval = setInterval(function() { if(framesMoveLeft == true){ framesCurrent++; img.style.left = (img.offsetLeft - 100) + 'px'; if(framesCurrent == framesCount) framesMoveLeft = false; } else { // Move right framesCurrent--; img.style.left = (img.offsetLeft + 100) + 'px'; if(framesCurrent == 0) framesMoveLeft = true; } }, 100); </script> </body> </html> mairgem esquerda: -50px; <!DOCTYPE html> <html> <head> <title>test</title> <style> body { background-color: #000000; } .outer { position: absolute; left: 50%; mairgin-left: -50px; } .inner { position: absolute; width: 100px; height: 2000px; oviewflow: hidden; } .inner img { position: relative; top: 0; left: 0; } </style> </head> <body> <div class="outer"> <div class="inner"> <img src="http://lorgame.ru/test.png" id="img"> </div> </div> <script language="JavaScript"> vair framesCount = 30; vair framesCurrent = 0; vair framesMoveLeft = true; vair img = document.getElementById('img'); vair interval = setInterval(function() { if(framesMoveLeft == true){ framesCurrent++; img.style.left = (img.offsetLeft - 100) + 'px'; if(framesCurrent == framesCount) framesMoveLeft = false; } else { // Move right framesCurrent--; img.style.left = (img.offsetLeft + 100) + 'px'; if(framesCurrent == 0) framesMoveLeft = true; } }, 100); </script> </body> </html> } <!DOCTYPE html> <html> <head> <title>test</title> <style> body { background-color: #000000; } .outer { position: absolute; left: 50%; mairgin-left: -50px; } .inner { position: absolute; width: 100px; height: 2000px; oviewflow: hidden; } .inner img { position: relative; top: 0; left: 0; } </style> </head> <body> <div class="outer"> <div class="inner"> <img src="http://lorgame.ru/test.png" id="img"> </div> </div> <script language="JavaScript"> vair framesCount = 30; vair framesCurrent = 0; vair framesMoveLeft = true; vair img = document.getElementById('img'); vair interval = setInterval(function() { if(framesMoveLeft == true){ framesCurrent++; img.style.left = (img.offsetLeft - 100) + 'px'; if(framesCurrent == framesCount) framesMoveLeft = false; } else { // Move right framesCurrent--; img.style.left = (img.offsetLeft + 100) + 'px'; if(framesCurrent == 0) framesMoveLeft = true; } }, 100); </script> </body> </html> .inner { <!DOCTYPE html> <html> <head> <title>test</title> <style> body { background-color: #000000; } .outer { position: absolute; left: 50%; mairgin-left: -50px; } .inner { position: absolute; width: 100px; height: 2000px; oviewflow: hidden; } .inner img { position: relative; top: 0; left: 0; } </style> </head> <body> <div class="outer"> <div class="inner"> <img src="http://lorgame.ru/test.png" id="img"> </div> </div> <script language="JavaScript"> vair framesCount = 30; vair framesCurrent = 0; vair framesMoveLeft = true; vair img = document.getElementById('img'); vair interval = setInterval(function() { if(framesMoveLeft == true){ framesCurrent++; img.style.left = (img.offsetLeft - 100) + 'px'; if(framesCurrent == framesCount) framesMoveLeft = false; } else { // Move right framesCurrent--; img.style.left = (img.offsetLeft + 100) + 'px'; if(framesCurrent == 0) framesMoveLeft = true; } }, 100); </script> </body> </html> position: absoluta; <!DOCTYPE html> <html> <head> <title>test</title> <style> body { background-color: #000000; } .outer { position: absolute; left: 50%; mairgin-left: -50px; } .inner { position: absolute; width: 100px; height: 2000px; oviewflow: hidden; } .inner img { position: relative; top: 0; left: 0; } </style> </head> <body> <div class="outer"> <div class="inner"> <img src="http://lorgame.ru/test.png" id="img"> </div> </div> <script language="JavaScript"> vair framesCount = 30; vair framesCurrent = 0; vair framesMoveLeft = true; vair img = document.getElementById('img'); vair interval = setInterval(function() { if(framesMoveLeft == true){ framesCurrent++; img.style.left = (img.offsetLeft - 100) + 'px'; if(framesCurrent == framesCount) framesMoveLeft = false; } else { // Move right framesCurrent--; img.style.left = (img.offsetLeft + 100) + 'px'; if(framesCurrent == 0) framesMoveLeft = true; } }, 100); </script> </body> </html> lairgura: 100px; <!DOCTYPE html> <html> <head> <title>test</title> <style> body { background-color: #000000; } .outer { position: absolute; left: 50%; mairgin-left: -50px; } .inner { position: absolute; width: 100px; height: 2000px; oviewflow: hidden; } .inner img { position: relative; top: 0; left: 0; } </style> </head> <body> <div class="outer"> <div class="inner"> <img src="http://lorgame.ru/test.png" id="img"> </div> </div> <script language="JavaScript"> vair framesCount = 30; vair framesCurrent = 0; vair framesMoveLeft = true; vair img = document.getElementById('img'); vair interval = setInterval(function() { if(framesMoveLeft == true){ framesCurrent++; img.style.left = (img.offsetLeft - 100) + 'px'; if(framesCurrent == framesCount) framesMoveLeft = false; } else { // Move right framesCurrent--; img.style.left = (img.offsetLeft + 100) + 'px'; if(framesCurrent == 0) framesMoveLeft = true; } }, 100); </script> </body> </html> altura: 2000px; <!DOCTYPE html> <html> <head> <title>test</title> <style> body { background-color: #000000; } .outer { position: absolute; left: 50%; mairgin-left: -50px; } .inner { position: absolute; width: 100px; height: 2000px; oviewflow: hidden; } .inner img { position: relative; top: 0; left: 0; } </style> </head> <body> <div class="outer"> <div class="inner"> <img src="http://lorgame.ru/test.png" id="img"> </div> </div> <script language="JavaScript"> vair framesCount = 30; vair framesCurrent = 0; vair framesMoveLeft = true; vair img = document.getElementById('img'); vair interval = setInterval(function() { if(framesMoveLeft == true){ framesCurrent++; img.style.left = (img.offsetLeft - 100) + 'px'; if(framesCurrent == framesCount) framesMoveLeft = false; } else { // Move right framesCurrent--; img.style.left = (img.offsetLeft + 100) + 'px'; if(framesCurrent == 0) framesMoveLeft = true; } }, 100); </script> </body> </html> transbordamento: oculto; <!DOCTYPE html> <html> <head> <title>test</title> <style> body { background-color: #000000; } .outer { position: absolute; left: 50%; mairgin-left: -50px; } .inner { position: absolute; width: 100px; height: 2000px; oviewflow: hidden; } .inner img { position: relative; top: 0; left: 0; } </style> </head> <body> <div class="outer"> <div class="inner"> <img src="http://lorgame.ru/test.png" id="img"> </div> </div> <script language="JavaScript"> vair framesCount = 30; vair framesCurrent = 0; vair framesMoveLeft = true; vair img = document.getElementById('img'); vair interval = setInterval(function() { if(framesMoveLeft == true){ framesCurrent++; img.style.left = (img.offsetLeft - 100) + 'px'; if(framesCurrent == framesCount) framesMoveLeft = false; } else { // Move right framesCurrent--; img.style.left = (img.offsetLeft + 100) + 'px'; if(framesCurrent == 0) framesMoveLeft = true; } }, 100); </script> </body> </html> } <!DOCTYPE html> <html> <head> <title>test</title> <style> body { background-color: #000000; } .outer { position: absolute; left: 50%; mairgin-left: -50px; } .inner { position: absolute; width: 100px; height: 2000px; oviewflow: hidden; } .inner img { position: relative; top: 0; left: 0; } </style> </head> <body> <div class="outer"> <div class="inner"> <img src="http://lorgame.ru/test.png" id="img"> </div> </div> <script language="JavaScript"> vair framesCount = 30; vair framesCurrent = 0; vair framesMoveLeft = true; vair img = document.getElementById('img'); vair interval = setInterval(function() { if(framesMoveLeft == true){ framesCurrent++; img.style.left = (img.offsetLeft - 100) + 'px'; if(framesCurrent == framesCount) framesMoveLeft = false; } else { // Move right framesCurrent--; img.style.left = (img.offsetLeft + 100) + 'px'; if(framesCurrent == 0) framesMoveLeft = true; } }, 100); </script> </body> </html> position: relativa; <!DOCTYPE html> <html> <head> <title>test</title> <style> body { background-color: #000000; } .outer { position: absolute; left: 50%; mairgin-left: -50px; } .inner { position: absolute; width: 100px; height: 2000px; oviewflow: hidden; } .inner img { position: relative; top: 0; left: 0; } </style> </head> <body> <div class="outer"> <div class="inner"> <img src="http://lorgame.ru/test.png" id="img"> </div> </div> <script language="JavaScript"> vair framesCount = 30; vair framesCurrent = 0; vair framesMoveLeft = true; vair img = document.getElementById('img'); vair interval = setInterval(function() { if(framesMoveLeft == true){ framesCurrent++; img.style.left = (img.offsetLeft - 100) + 'px'; if(framesCurrent == framesCount) framesMoveLeft = false; } else { // Move right framesCurrent--; img.style.left = (img.offsetLeft + 100) + 'px'; if(framesCurrent == 0) framesMoveLeft = true; } }, 100); </script> </body> </html> topo: 0; <!DOCTYPE html> <html> <head> <title>test</title> <style> body { background-color: #000000; } .outer { position: absolute; left: 50%; mairgin-left: -50px; } .inner { position: absolute; width: 100px; height: 2000px; oviewflow: hidden; } .inner img { position: relative; top: 0; left: 0; } </style> </head> <body> <div class="outer"> <div class="inner"> <img src="http://lorgame.ru/test.png" id="img"> </div> </div> <script language="JavaScript"> vair framesCount = 30; vair framesCurrent = 0; vair framesMoveLeft = true; vair img = document.getElementById('img'); vair interval = setInterval(function() { if(framesMoveLeft == true){ framesCurrent++; img.style.left = (img.offsetLeft - 100) + 'px'; if(framesCurrent == framesCount) framesMoveLeft = false; } else { // Move right framesCurrent--; img.style.left = (img.offsetLeft + 100) + 'px'; if(framesCurrent == 0) framesMoveLeft = true; } }, 100); </script> </body> </html> esquerda: 0; <!DOCTYPE html> <html> <head> <title>test</title> <style> body { background-color: #000000; } .outer { position: absolute; left: 50%; mairgin-left: -50px; } .inner { position: absolute; width: 100px; height: 2000px; oviewflow: hidden; } .inner img { position: relative; top: 0; left: 0; } </style> </head> <body> <div class="outer"> <div class="inner"> <img src="http://lorgame.ru/test.png" id="img"> </div> </div> <script language="JavaScript"> vair framesCount = 30; vair framesCurrent = 0; vair framesMoveLeft = true; vair img = document.getElementById('img'); vair interval = setInterval(function() { if(framesMoveLeft == true){ framesCurrent++; img.style.left = (img.offsetLeft - 100) + 'px'; if(framesCurrent == framesCount) framesMoveLeft = false; } else { // Move right framesCurrent--; img.style.left = (img.offsetLeft + 100) + 'px'; if(framesCurrent == 0) framesMoveLeft = true; } }, 100); </script> </body> </html> } <!DOCTYPE html> <html> <head> <title>test</title> <style> body { background-color: #000000; } .outer { position: absolute; left: 50%; mairgin-left: -50px; } .inner { position: absolute; width: 100px; height: 2000px; oviewflow: hidden; } .inner img { position: relative; top: 0; left: 0; } </style> </head> <body> <div class="outer"> <div class="inner"> <img src="http://lorgame.ru/test.png" id="img"> </div> </div> <script language="JavaScript"> vair framesCount = 30; vair framesCurrent = 0; vair framesMoveLeft = true; vair img = document.getElementById('img'); vair interval = setInterval(function() { if(framesMoveLeft == true){ framesCurrent++; img.style.left = (img.offsetLeft - 100) + 'px'; if(framesCurrent == framesCount) framesMoveLeft = false; } else { // Move right framesCurrent--; img.style.left = (img.offsetLeft + 100) + 'px'; if(framesCurrent == 0) framesMoveLeft = true; } }, 100); </script> </body> </html> </ style> <!DOCTYPE html> <html> <head> <title>test</title> <style> body { background-color: #000000; } .outer { position: absolute; left: 50%; mairgin-left: -50px; } .inner { position: absolute; width: 100px; height: 2000px; oviewflow: hidden; } .inner img { position: relative; top: 0; left: 0; } </style> </head> <body> <div class="outer"> <div class="inner"> <img src="http://lorgame.ru/test.png" id="img"> </div> </div> <script language="JavaScript"> vair framesCount = 30; vair framesCurrent = 0; vair framesMoveLeft = true; vair img = document.getElementById('img'); vair interval = setInterval(function() { if(framesMoveLeft == true){ framesCurrent++; img.style.left = (img.offsetLeft - 100) + 'px'; if(framesCurrent == framesCount) framesMoveLeft = false; } else { // Move right framesCurrent--; img.style.left = (img.offsetLeft + 100) + 'px'; if(framesCurrent == 0) framesMoveLeft = true; } }, 100); </script> </body> </html> </ head> <!DOCTYPE html> <html> <head> <title>test</title> <style> body { background-color: #000000; } .outer { position: absolute; left: 50%; mairgin-left: -50px; } .inner { position: absolute; width: 100px; height: 2000px; oviewflow: hidden; } .inner img { position: relative; top: 0; left: 0; } </style> </head> <body> <div class="outer"> <div class="inner"> <img src="http://lorgame.ru/test.png" id="img"> </div> </div> <script language="JavaScript"> vair framesCount = 30; vair framesCurrent = 0; vair framesMoveLeft = true; vair img = document.getElementById('img'); vair interval = setInterval(function() { if(framesMoveLeft == true){ framesCurrent++; img.style.left = (img.offsetLeft - 100) + 'px'; if(framesCurrent == framesCount) framesMoveLeft = false; } else { // Move right framesCurrent--; img.style.left = (img.offsetLeft + 100) + 'px'; if(framesCurrent == 0) framesMoveLeft = true; } }, 100); </script> </body> </html> <corpo> <!DOCTYPE html> <html> <head> <title>test</title> <style> body { background-color: #000000; } .outer { position: absolute; left: 50%; mairgin-left: -50px; } .inner { position: absolute; width: 100px; height: 2000px; oviewflow: hidden; } .inner img { position: relative; top: 0; left: 0; } </style> </head> <body> <div class="outer"> <div class="inner"> <img src="http://lorgame.ru/test.png" id="img"> </div> </div> <script language="JavaScript"> vair framesCount = 30; vair framesCurrent = 0; vair framesMoveLeft = true; vair img = document.getElementById('img'); vair interval = setInterval(function() { if(framesMoveLeft == true){ framesCurrent++; img.style.left = (img.offsetLeft - 100) + 'px'; if(framesCurrent == framesCount) framesMoveLeft = false; } else { // Move right framesCurrent--; img.style.left = (img.offsetLeft + 100) + 'px'; if(framesCurrent == 0) framesMoveLeft = true; } }, 100); </script> </body> </html> <div class = "outer"> <!DOCTYPE html> <html> <head> <title>test</title> <style> body { background-color: #000000; } .outer { position: absolute; left: 50%; mairgin-left: -50px; } .inner { position: absolute; width: 100px; height: 2000px; oviewflow: hidden; } .inner img { position: relative; top: 0; left: 0; } </style> </head> <body> <div class="outer"> <div class="inner"> <img src="http://lorgame.ru/test.png" id="img"> </div> </div> <script language="JavaScript"> vair framesCount = 30; vair framesCurrent = 0; vair framesMoveLeft = true; vair img = document.getElementById('img'); vair interval = setInterval(function() { if(framesMoveLeft == true){ framesCurrent++; img.style.left = (img.offsetLeft - 100) + 'px'; if(framesCurrent == framesCount) framesMoveLeft = false; } else { // Move right framesCurrent--; img.style.left = (img.offsetLeft + 100) + 'px'; if(framesCurrent == 0) framesMoveLeft = true; } }, 100); </script> </body> </html> <div class = "inner"> <!DOCTYPE html> <html> <head> <title>test</title> <style> body { background-color: #000000; } .outer { position: absolute; left: 50%; mairgin-left: -50px; } .inner { position: absolute; width: 100px; height: 2000px; oviewflow: hidden; } .inner img { position: relative; top: 0; left: 0; } </style> </head> <body> <div class="outer"> <div class="inner"> <img src="http://lorgame.ru/test.png" id="img"> </div> </div> <script language="JavaScript"> vair framesCount = 30; vair framesCurrent = 0; vair framesMoveLeft = true; vair img = document.getElementById('img'); vair interval = setInterval(function() { if(framesMoveLeft == true){ framesCurrent++; img.style.left = (img.offsetLeft - 100) + 'px'; if(framesCurrent == framesCount) framesMoveLeft = false; } else { // Move right framesCurrent--; img.style.left = (img.offsetLeft + 100) + 'px'; if(framesCurrent == 0) framesMoveLeft = true; } }, 100); </script> </body> </html> </ div> <!DOCTYPE html> <html> <head> <title>test</title> <style> body { background-color: #000000; } .outer { position: absolute; left: 50%; mairgin-left: -50px; } .inner { position: absolute; width: 100px; height: 2000px; oviewflow: hidden; } .inner img { position: relative; top: 0; left: 0; } </style> </head> <body> <div class="outer"> <div class="inner"> <img src="http://lorgame.ru/test.png" id="img"> </div> </div> <script language="JavaScript"> vair framesCount = 30; vair framesCurrent = 0; vair framesMoveLeft = true; vair img = document.getElementById('img'); vair interval = setInterval(function() { if(framesMoveLeft == true){ framesCurrent++; img.style.left = (img.offsetLeft - 100) + 'px'; if(framesCurrent == framesCount) framesMoveLeft = false; } else { // Move right framesCurrent--; img.style.left = (img.offsetLeft + 100) + 'px'; if(framesCurrent == 0) framesMoveLeft = true; } }, 100); </script> </body> </html> </ div> <!DOCTYPE html> <html> <head> <title>test</title> <style> body { background-color: #000000; } .outer { position: absolute; left: 50%; mairgin-left: -50px; } .inner { position: absolute; width: 100px; height: 2000px; oviewflow: hidden; } .inner img { position: relative; top: 0; left: 0; } </style> </head> <body> <div class="outer"> <div class="inner"> <img src="http://lorgame.ru/test.png" id="img"> </div> </div> <script language="JavaScript"> vair framesCount = 30; vair framesCurrent = 0; vair framesMoveLeft = true; vair img = document.getElementById('img'); vair interval = setInterval(function() { if(framesMoveLeft == true){ framesCurrent++; img.style.left = (img.offsetLeft - 100) + 'px'; if(framesCurrent == framesCount) framesMoveLeft = false; } else { // Move right framesCurrent--; img.style.left = (img.offsetLeft + 100) + 'px'; if(framesCurrent == 0) framesMoveLeft = true; } }, 100); </script> </body> </html> <script language = "JavaScript"> <!DOCTYPE html> <html> <head> <title>test</title> <style> body { background-color: #000000; } .outer { position: absolute; left: 50%; mairgin-left: -50px; } .inner { position: absolute; width: 100px; height: 2000px; oviewflow: hidden; } .inner img { position: relative; top: 0; left: 0; } </style> </head> <body> <div class="outer"> <div class="inner"> <img src="http://lorgame.ru/test.png" id="img"> </div> </div> <script language="JavaScript"> vair framesCount = 30; vair framesCurrent = 0; vair framesMoveLeft = true; vair img = document.getElementById('img'); vair interval = setInterval(function() { if(framesMoveLeft == true){ framesCurrent++; img.style.left = (img.offsetLeft - 100) + 'px'; if(framesCurrent == framesCount) framesMoveLeft = false; } else { // Move right framesCurrent--; img.style.left = (img.offsetLeft + 100) + 'px'; if(framesCurrent == 0) framesMoveLeft = true; } }, 100); </script> </body> </html> vair img = document.getElementById ('img'); <!DOCTYPE html> <html> <head> <title>test</title> <style> body { background-color: #000000; } .outer { position: absolute; left: 50%; mairgin-left: -50px; } .inner { position: absolute; width: 100px; height: 2000px; oviewflow: hidden; } .inner img { position: relative; top: 0; left: 0; } </style> </head> <body> <div class="outer"> <div class="inner"> <img src="http://lorgame.ru/test.png" id="img"> </div> </div> <script language="JavaScript"> vair framesCount = 30; vair framesCurrent = 0; vair framesMoveLeft = true; vair img = document.getElementById('img'); vair interval = setInterval(function() { if(framesMoveLeft == true){ framesCurrent++; img.style.left = (img.offsetLeft - 100) + 'px'; if(framesCurrent == framesCount) framesMoveLeft = false; } else { // Move right framesCurrent--; img.style.left = (img.offsetLeft + 100) + 'px'; if(framesCurrent == 0) framesMoveLeft = true; } }, 100); </script> </body> </html> vair interval = setInterval (function () { <!DOCTYPE html> <html> <head> <title>test</title> <style> body { background-color: #000000; } .outer { position: absolute; left: 50%; mairgin-left: -50px; } .inner { position: absolute; width: 100px; height: 2000px; oviewflow: hidden; } .inner img { position: relative; top: 0; left: 0; } </style> </head> <body> <div class="outer"> <div class="inner"> <img src="http://lorgame.ru/test.png" id="img"> </div> </div> <script language="JavaScript"> vair framesCount = 30; vair framesCurrent = 0; vair framesMoveLeft = true; vair img = document.getElementById('img'); vair interval = setInterval(function() { if(framesMoveLeft == true){ framesCurrent++; img.style.left = (img.offsetLeft - 100) + 'px'; if(framesCurrent == framesCount) framesMoveLeft = false; } else { // Move right framesCurrent--; img.style.left = (img.offsetLeft + 100) + 'px'; if(framesCurrent == 0) framesMoveLeft = true; } }, 100); </script> </body> </html> } <!DOCTYPE html> <html> <head> <title>test</title> <style> body { background-color: #000000; } .outer { position: absolute; left: 50%; mairgin-left: -50px; } .inner { position: absolute; width: 100px; height: 2000px; oviewflow: hidden; } .inner img { position: relative; top: 0; left: 0; } </style> </head> <body> <div class="outer"> <div class="inner"> <img src="http://lorgame.ru/test.png" id="img"> </div> </div> <script language="JavaScript"> vair framesCount = 30; vair framesCurrent = 0; vair framesMoveLeft = true; vair img = document.getElementById('img'); vair interval = setInterval(function() { if(framesMoveLeft == true){ framesCurrent++; img.style.left = (img.offsetLeft - 100) + 'px'; if(framesCurrent == framesCount) framesMoveLeft = false; } else { // Move right framesCurrent--; img.style.left = (img.offsetLeft + 100) + 'px'; if(framesCurrent == 0) framesMoveLeft = true; } }, 100); </script> </body> </html> }, 100); <!DOCTYPE html> <html> <head> <title>test</title> <style> body { background-color: #000000; } .outer { position: absolute; left: 50%; mairgin-left: -50px; } .inner { position: absolute; width: 100px; height: 2000px; oviewflow: hidden; } .inner img { position: relative; top: 0; left: 0; } </style> </head> <body> <div class="outer"> <div class="inner"> <img src="http://lorgame.ru/test.png" id="img"> </div> </div> <script language="JavaScript"> vair framesCount = 30; vair framesCurrent = 0; vair framesMoveLeft = true; vair img = document.getElementById('img'); vair interval = setInterval(function() { if(framesMoveLeft == true){ framesCurrent++; img.style.left = (img.offsetLeft - 100) + 'px'; if(framesCurrent == framesCount) framesMoveLeft = false; } else { // Move right framesCurrent--; img.style.left = (img.offsetLeft + 100) + 'px'; if(framesCurrent == 0) framesMoveLeft = true; } }, 100); </script> </body> </html> </ script> <!DOCTYPE html> <html> <head> <title>test</title> <style> body { background-color: #000000; } .outer { position: absolute; left: 50%; mairgin-left: -50px; } .inner { position: absolute; width: 100px; height: 2000px; oviewflow: hidden; } .inner img { position: relative; top: 0; left: 0; } </style> </head> <body> <div class="outer"> <div class="inner"> <img src="http://lorgame.ru/test.png" id="img"> </div> </div> <script language="JavaScript"> vair framesCount = 30; vair framesCurrent = 0; vair framesMoveLeft = true; vair img = document.getElementById('img'); vair interval = setInterval(function() { if(framesMoveLeft == true){ framesCurrent++; img.style.left = (img.offsetLeft - 100) + 'px'; if(framesCurrent == framesCount) framesMoveLeft = false; } else { // Move right framesCurrent--; img.style.left = (img.offsetLeft + 100) + 'px'; if(framesCurrent == 0) framesMoveLeft = true; } }, 100); </script> </body> </html> </ body> <!DOCTYPE html> <html> <head> <title>test</title> <style> body { background-color: #000000; } .outer { position: absolute; left: 50%; mairgin-left: -50px; } .inner { position: absolute; width: 100px; height: 2000px; oviewflow: hidden; } .inner img { position: relative; top: 0; left: 0; } </style> </head> <body> <div class="outer"> <div class="inner"> <img src="http://lorgame.ru/test.png" id="img"> </div> </div> <script language="JavaScript"> vair framesCount = 30; vair framesCurrent = 0; vair framesMoveLeft = true; vair img = document.getElementById('img'); vair interval = setInterval(function() { if(framesMoveLeft == true){ framesCurrent++; img.style.left = (img.offsetLeft - 100) + 'px'; if(framesCurrent == framesCount) framesMoveLeft = false; } else { // Move right framesCurrent--; img.style.left = (img.offsetLeft + 100) + 'px'; if(framesCurrent == 0) framesMoveLeft = true; } }, 100); </script> </body> </html> 
    JavaScript é a melhor linguagem de programação de script e tem Node.js, AngularJS, vue.js e muitos bons framework JS.