<style type="text/css">
#demo {
background: #FFF;
overflow:hidden;
border: 1px dashed #CCC;
width: 960;
}
#demo img {
border: 3px solid #F2F2F2;
}
#indemo {
float: left;
width: 800%;
}
#demo1 {
float: left;
}
#demo2 {
float: left;
} </style>
<div id="demo">
<div id="indemo">
<div id="demo1">
<a href="http://ntwood.vn/%E2%99%A5-SAN-PHAM-349-1.html"><img alt="" src="http://ntwood.vn/img/Type/137.jpg" style="width: 100px; height: 100px;" /></a> <a href="http://ntwood.vn/%E2%99%A5-SAN-PHAM-349-1.html/"><img alt="" src="http://ntwood.vn/img/Type/138.jpg" style="width: 100px; height: 100px;" /></a> <a href="http://ntwood.vn/%E2%99%A5-SAN-PHAM-349-1.html"><img alt="" src="http://ntwood.vn/img/Type/139.jpg" style="width: 100px; height: 100px;" /></a> <a href="http://ntwood.vn/%E2%99%A5-SAN-PHAM-349-1.html"><img alt="" src="http://ntwood.vn/img/Type/140.jpg" style="width: 100px; height: 100px;" /></a> <a href="http://ntwood.vn/%E2%99%A5-SAN-PHAM-349-1.html"><img alt="" src="http://ntwood.vn/img/Type/141.jpg" style="width: 100px; height: 100px;" /></a> <a href="http://ntwood.vn/%E2%99%A5-SAN-PHAM-349-1.html"><img alt="" src="http://ntwood.vn/img/Type/142.jpg" style="width: 100px; height: 100px;" /></a> <a href="http://ntwood.vn/%E2%99%A5-SAN-PHAM-349-1.html"><img alt="" src="http://ntwood.vn/img/Type/143.jpg" style="width: 100px; height: 100px;" /></a> <a href="http://ntwood.vn/%E2%99%A5-SAN-PHAM-349-1.html"><img alt="" src="http://ntwood.vn/img/Type/144.jpg" style="width: 100px; height: 100px;" /></a> <a href="http://ntwood.vn/%E2%99%A5-SAN-PHAM-349-1.html"><img alt="" src="http://ntwood.vn/img/Type/145.jpg" style="width: 100px; height: 100px;" /></a> <a href="http://ntwood.vn/%E2%99%A5-SAN-PHAM-349-1.html"><img alt="" src="http://ntwood.vn/img/Type/146.jpg" style="width: 100px; height: 100px;" /></a><a href="http://ntwood.vn/%E2%99%A5-SAN-PHAM-349-1.html"><img alt="" src="http://ntwood.vn/img/Type/147.jpg" style="width: 100px; height: 100px;" /></a><a href="http://ntwood.vn/%E2%99%A5-SAN-PHAM-349-1.html"><img alt="" src="http://ntwood.vn/img/Type/148.jpg" style="width: 100px; height: 100px;" /></a> <a href="http://ntwood.vn/%E2%99%A5-SAN-PHAM-349-1.html"><img alt="" src="http://ntwood.vn/img/Type/149.jpg" style="width: 100px; height: 100px;" /></a> <a href="http://ntwood.vn/%E2%99%A5-SAN-PHAM-349-1.html"><img alt="" src="http://ntwood.vn/img/Type/150.jpg" style="width: 100px; height: 100px;" /></a> <a href="http://ntwood.vn/%E2%99%A5-SAN-PHAM-349-1.html"><img alt="" src="http://ntwood.vn/img/Type/151.jpg" style="width: 100px; height: 100px;" /></a> <a href="http://ntwood.vn/%E2%99%A5-SAN-PHAM-349-1.html"><img alt="" src="http://ntwood.vn/img/Type/152.jpg" style="width: 100px; height: 100px;" /></a></div>
<div id="demo2">
<a href="http://ntwood.vn/"><img alt="" src="http://ntwood.vn/img/Type/136.jpg" style="width: 100px; height: 100px;" /></a></div>
</div>
</div>
<script>
var speed = 100;
var tab = document.getElementById("demo");
var tab1 = document.getElementById("demo1");
var tab2 = document.getElementById("demo2");
tab2.innerHTML = tab1.innerHTML;
function Marquee() {
if (tab2.offsetWidth - tab.scrollLeft <= 0)
tab.scrollLeft -= tab1.offsetWidth
else {
tab.scrollLeft++;
}
}
var MyMar = setInterval(Marquee, speed);
tab.onmouseover = function() { clearInterval(MyMar) };
tab.onmouseout = function() { MyMar = setInterval(Marquee, speed) };
</script>
Xem mẫu : http://www.legendee.xyz