+ 2
Anyone can fix this
4 Answers
+ 1
<div id="box" class="box"></div>
<script>
window.onload = () => {
var box = document.getElementById("box");
var yy = window.innerHeight / 2.50;
box.style.width = window.innerWidth;
box.style.margin = yy + "px 0px";
var px = "px";
var x = 30;
var y = 20;
var dx = 2;
var dy = 2;
var r = 30 + px;
var square = document.createElement("div");
square.style.background = "blue";
square.style.width = r + "px";
square.style.height = r + "px";
document.getElementById("box").appendChild(square);
function Box(x, y, dx, dy) {
this.x = x;
this.y = y;
this.dx = dx;
this.dy = dy;
}
function Frame() {
y += -2;
square.style.margin = y + "px " + x + "px";
requestAnimationFrame(Frame);
}
Frame();
};
</script>
+ 1
I just I want move the blue box not the line
+ 1
Try after Removing border-bottom
+ 1
You may use <hr> for a horizontal line.
Place the <hr> tag above the div tag.
Then remove border-bottom from the box class.