Differenze tra le versioni di "Teste"

Da Cliomatica - Digital History.
 
(7 versioni intermedie di uno stesso utente non sono mostrate)
Riga 1: Riga 1:
<!DOCTYPE html>
+
{| width="450" style="float:right; margin-left: 10px;margin-right: 10px;border-style:solid; border-width: 0 0 2px 2px; background:#f2e7e7; border-color:#B943C2; padding: 55px" padding: 30px
<html>
+
|'''{{Letra|%=100|texto= >>}} '''
<style>
+
|-
#myContainer {
+
|
  width: 400px;
+
|-
  height: 400px;
+
|
  position: relative;
+
|
  background: yellow;
 
}
 
#myAnimation {
 
  width: 50px;
 
  height: 50px;
 
  position: absolute;
 
  background-color: red;
 
}
 
</style>
 
<body>
 
  
<p>
+
{{{links}}}
<button onclick="myMove()">Click Me</button>
+
|-
</p>
+
|}
 
 
<div id ="myContainer">
 
<div id ="myAnimation"></div>
 
</div>
 
 
 
<script>
 
function myMove() {
 
  var elem = document.getElementById("myAnimation"); 
 
  var pos = 0;
 
  var id = setInterval(frame, 10);
 
  function frame() {
 
    if (pos == 350) {
 
      clearInterval(id);
 
    } else {
 
      pos++;
 
      elem.style.top = pos + 'px';
 
      elem.style.left = pos + 'px';
 
    }
 
  }
 
}
 
</script>
 
 
 
</body>
 
</html>
 

Versione attuale delle 09:51, 13 feb 2020

{| width="450" style="float:right; margin-left: 10px;margin-right: 10px;border-style:solid; border-width: 0 0 2px 2px; background:#f2e7e7; border-color:#B943C2; padding: 55px" padding: 30px
|'''{{Letra|%=100|texto= >>}} '''
|-
| 
|-
| 
|

{{{links}}}
|-
|}