this.innerHTML = "<div id='container'></div>";
});
var container = document.getElementById('container');
var topLeft = new Array(3).fill(null);
topLeft[0] = {x: 100, y: 50};
topLeft[1] = {x: 200, y: 50};
topLeft[2] = {x: 300, y: 50};
function move(e) {
var x = e.clientX - window.scrollX;
var y = e.clientY - window.scrollY;
if (x < topLeft[0].x && y < topLeft[0].y) {
//一步一步向右移动
topLeft[0].x += 10;
topLeft[0].y += 10;
} else if (x > topLeft[2].x && y > topLeft[2].y) {
//一步一步向左移动
topLeft[2].x -= 10;
topLeft[2].y -= 10;
} else if (x < topLeft[1].x && y < topLeft[1].y) {
//一步一步向上移动
topLeft[1].x += 10;
topLeft[1].y += 10;
} else if (x > topLeft[0].x && y > topLeft[0].y) {
//一步一步向下移动
topLeft[0].x -= 10;
topLeft[0].y -= 10;
}
window.addEventListener("scroll", move);
document.getElementById('container').style.width = window.innerWidth + "px";
document.getElementById('container').style.height = window.innerHeight + "px";
document.getElementById('container').innerHTML = '<div id="container"></div>';
Tiền vào thông tin thêm về chủ đề:ceso trôi sang công ty intéressế