В этой статье описывается метод реализации временного эффекта рисунка изображения JS. Поделитесь этим для вашей ссылки, следующим образом:
<! Doctype html public "-// w3c // dtd xhtml 1.0 transitional // en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd"> <html xmlns = "http://www.w3.org/1999/xhtml"> <head> <meta http-equiv = "content-type" content = "text/html; charset = utf-8"/> <meta http-equiv = x-ua-compatible "content" content "ie = 7"/> 7 "/> 7"/> 7 "/> 7"/> 7 "/> 7". эффект </title> <style type = "text/css"> .father {position: относительно; переполнение: скрыто; высота: 100px; Ширина: 300px; } .box {float: left; размер шрифта: 12px; Ширина: 80px; Высота: 120px; переполнение: скрыто; позиция: абсолютно; } </style> <script language = "javascript" type = "text/javascript"> var t; window.onload = function () {var o = document.getElementById ('box'); t = window.setInterval (function () {scrollup (o, 24, 0);}, 3000)} /// Спросите основной метод /// Параметры: o Прокрутка блока /// Параметры: d Высота каждого прокрутки //////////////1 (c- 78). GetFirstChild (O.FirstChild) .clonenode (true); O.RemoveChild (GetFirstChild (O.FirstChild)); O.AppendChild (T); t.style.margintop = "0px"; } else {c += 1; getFirstChild (O.FirstChild) .Style.margintop = -c + "px"; window.settimeout (function () {scrollup (o, d, c)}, 15); }} // Решить проблему, что пространства возвращаются в виде узлов в функции Firefox getFirstChild (node) {while (node.nodeType! = 1) {node = node.nextibling; } return node; } </script> </head> <body> Демонстрация эффекта времени прокрутки времени прокрутки <hr> <div> <div id = "> <div> <img src =" ../ img/head/1.png "/> </div> <div> <img src =" ../ img/head/2.png "/> </div> <div> src = "../ img/head/3.png"/> </div> <div> <img src = "../ img/head/4.png"/> </div> </div> </div> </body> </html>For more information about JavaScript related content, please check out the topics of this site: "Summary of JavaScript switching effects and techniques", "Summary of JavaScript search algorithm skills", "Summary of JavaScript animation effects and techniques", "Summary of JavaScript errors and debugging techniques", "Summary of JavaScript data structures and algorithm skills", "Summary of Алгоритмы и методы обхода JavaScript »и« Сводка использования математических операций JavaScript ».
Я надеюсь, что эта статья будет полезна для каждого программирования JavaScript.