Phiên bản đầy đủ: jsB@nk » Hình ảnh » Ảnh trượt qua lại
URL: https://www.javascriptbank.com/float-images-glide-back-and-forth.html
Hiệu ứng tạo ảnh trượt liên tục trong trang web theo chiều từ trái sang phải và theo chiều ngược lại.
Phiên bản đầy đủ: jsB@nk » Hình ảnh » Ảnh trượt qua lại
URL: https://www.javascriptbank.com/float-images-glide-back-and-forth.html
<style type="text/css">body { overflow:hidden; margin:0; padding:0; font: 14px/1.3 verdana, arial, helvetica, sans-serif }h1 { font-size:18px; margin:.5em 1em 1.2em 10px }p { margin:.5em 1em 1.2em 10px }a:link { color:#33c }a:visited { color:#339 }#container { position:absolute; bottom:0; left:0; visibility:hidden; height:80px; width:100%; overflow:hidden; background-color:#ddecff; }#floatDiv { position:absolute; visibility:hidden; left:0; top:0; z-index:200; }</style><!-- This script downloaded from www.JavaScriptBank.com Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->
<script src="dw_float.js"></script><!-- This script downloaded from www.JavaScriptBank.com Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->
<div id="container" style="visibility: visible;"> <div id="floatDiv" style="top: 32px; visibility: visible; left: 118px;"><img src="sm-duck.gif" width="90" height="44" alt=""></div></div><script type="text/javascript">if (document.getElementById) { // arguments: id, left, top, direction, speed (pixels per loop), delay for restart or null, end function new floatObject("floatDiv", -100, 32, "right", 2, null, turnAround); document.getElementById('container').style.visibility = "visible";} function turnAround(obj) { if (!obj.el.firstChild) return; obj.active = false; if (obj.speed > 0) obj.el.firstChild.setAttribute("src", "/images/common/sm-duck-left.gif"); else obj.el.firstChild.setAttribute("src", "/images/common/sm-duck.gif"); obj.speed = -obj.speed; for (var i=0; i<floatObject.holder.length; i++) { if (floatObject.holder[i].id == obj.id) setTimeout("floatObject.holder["+i+"].active = true", 100); }}</script><!-- This script downloaded from www.JavaScriptBank.com Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->
http://javascriptbank.com/javascript/image/Float_Images/dw_float.js