How to determine the coordinates inside the block?

There is a page on it 3 blocks, in each of them to determine the coordinates, so that when you hover over each of them the count was started with 0?
ie blocks 10px and imposing on some of them, showing what part of the block on the X axis right now, we, 1, 3, 10 px.
So on each, each has a beginning and an end.
July 2nd 19 at 18:23
1 answer
July 2nd 19 at 18:25
Solution

Find more questions by tags JavaScript