CuongCao
Búa Gỗ Đôi
Em muốn làm slide show ảnh cho blogspot, em tìm được code này, khi chèn vào thì được nhưng nó không hiển thị được responsive khi thay đổi kích thước màn hình, nhưng ở web họ demo thì lại hiển thị được, anh chị có thể giúp em code thế nào cho nó hiển thị responsive được ạ
- Code:
- Web demo
Em cảm ơn ạ
- Code:
Mã:
<script type="text/javascript">
// Banner Rotation Script by Bloggerism
var ban = new Array();
var link = new Array();
var index = 0;
ban[0] = new Image();
ban[0].src = "URL_banner_0";
link[0] = "URL_link_0";
ban[1] = new Image();
ban[1].src = "URL_banner_1";
link[1] = "URL_link_1";
ban[2] = new Image();
ban[2].src = "URL_banner_2";
link[2] = "URL_link_2";
index = Math.random() * (ban.length);
index = Math.floor(index);
function rotator()
{if (index == ban.length) index = 0;
if (document.images) {
document.images.rotation.src = ban[index].src;
}
else {
document.getElementById('rotation').src=ban[index].src;
}
index++;
setTimeout('rotator()',3000);
}
function go() {window.open(link[index-1]);}
</script>
<img id="rotation" style="cursor:pointer;" src="" onclick="go();"/>
<script type="text/javascript">rotator();</script>
Mã:
http://www.123tailieufree.com/