Kód:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
<!DOCTYPE html> <head> </head> <style type = "text/css"> @font-face { font-family: "DSEG7ClassicMini-Bold"; src: url("http://nas4y.net/ssd/fonts/DSEG7ClassicMini-Bold.ttf"); } h1 { font-family: DSEG7ClassicMini-Bold; font-size: 80vh; text-align: center; color: red; margin: 0; } body { background-color: black; } </style> <body> <h1 id="demo">1</h1> <script> var i = document.getElementById("demo").innerHTML; var t = 0; function plusLoop() { setTimeout(function() { document.getElementById("demo").innerHTML = i; i++; if (i < 16) { if (i >= 15) { t = 1; minusLoop(); } else { plusLoop(); }; } }, 1000) } function minusLoop() { setTimeout(function() { document.getElementById("demo").innerHTML = i; i--; if (i < 16) { if (i <= 0) { t = 0; plusLoop(); } else { minusLoop(); }; } }, 1000) } plusLoop(); </script> </body> </html> |
http://nas4y.net/test/jtest.html
Webový display na raspberry pi
Ke stažení: Webovy-display-na-raspberry-pi.pdf