auto scroll from top to bottom and back in repeat
Hey there,
I just set some html-sites for our school infodisplay. The tool Screenly OSE shows the Websites in a shuffle play. Thats all working. But there are a fiew sites with much content. The screen solution will be 1920 x 1080 pixel and these websites will not fit because of there length. So, what code could I implement in my html sites, which include xml.files with php in html? One of these sites looks like this:
- <!DOCTYPE html>
- <html lang="de">
- <head>
- <meta charset="UTF-8">
- <title>xy</title>
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <meta http-equiv="refresh" content="60">
- <link href="../xy.css" rel="stylesheet">
- <link href="https://fonts.googleapis.com/css?family=Open+Sans|Lobster|Trirong" rel="stylesheet">
- <script src="http://code.jquery.com/jquery-latest.js"></script>
- <script src="autoscroll.js"></script>
- </head>
- <body>
- <div class="box">
- <div class="content-box">
- <div class="logo-small"><img src="../xy/xy.jpg" width="100px" /></div>
- <div>
- <?php
- // Creat new DOM-Object
- $xml = new DOMDocument();
- // Load xml-file
- $xml->preserveWhiteSpace = false;
- function sortByDate($a,$b) {
- if(filemtime($a) === filemtime($b))
- return 0;
- return (filemtime($a) < filemtime($b)) ? 1 : -1;
- }
- $files = glob("*.xml");
- usort($files,"sortByDate");
- $xml->load($files[0]);
- // Create new DOM-Object
- $xsl = new DOMDocument();
- // load xsl-file
- $xsl->load("xy.xsl");
- // Process content and post it
- $proc = new XSLTProcessor;
- $proc->importStyleSheet($xsl);
- $proc->setParameter('','PARAM_NAME',$param_value);
- echo $proc->transformToXML($xml);
- ?>
- </div>
- <div id="xy">some text xy</div>
- </div>
- </div>
- </body>
- </html>
HTML, CSS and PHP works great.
I would like to autoscroll the whole website beginning at the div container "logo-small" towards "xy" at the end of the site.
I have been exercising with a view examples, but no one worked at all. Maybe there is a problem because of the php-file-include?
I tried as well the code on this page, but that did not work too!: