A
A
Artem00712017-05-19 20:21:01
css
Artem0071, 2017-05-19 20:21:01

How to move an element relative to the mouse when clicked?

Good afternoon!
I want the block to move relative to the parent element.
I have an outer block, as it were, limited to 500 pixels, and an inner one 3000 pixels wide.
So, if the black square goes beyond the visible initial boundaries, then it starts to behave strangely.
So here is my whole code

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question