+ 7

I have the code below, how to make instead of px, vw, vh, % or anything else?

In the js, I want to make the top and left of the div in % , not in px, but if I change it, it doesn't work as I want. https://code.sololearn.com/W5QUrzsTH5dr/?ref=app

31st Jan 2020, 8:29 PM
🍇 Alex Tușinean 💜
🍇 Alex Tușinean 💜 - avatar
2 Answers
+ 4
lololearn yeah, but I want the div to move exactly where is my finger. I don't know how to do that with %, or vw/vh.
1st Feb 2020, 5:33 PM
🍇 Alex Tușinean 💜
🍇 Alex Tușinean 💜 - avatar
+ 1
Did you try : body{ // width:100%; height:100%; // } ?
1st Feb 2020, 5:25 PM
lolo
lolo - avatar