Anyone can fix this | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
12th Jun 2023, 2:32 PM
Leonard
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>
14th Jun 2023, 11:02 AM
Vaibhav
Vaibhav - avatar
+ 1
I just I want move the blue box not the line
12th Jun 2023, 2:33 PM
Leonard
+ 1
Try after Removing border-bottom
12th Jun 2023, 2:49 PM
Jayakrishna 🇮🇳
+ 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.
13th Jun 2023, 12:29 AM
Chris Coder
Chris Coder - avatar