I do not know how the title of the question should be. but I will explain what I want to do. I have a div with class name "scroll-inner-container", this div height is 70vh. when my mouse hovers over this div from the top to 10% (this is the mouseover area from 0% to 10% in this div), and from the bottom to 10%, after which the function starts.
How can I measure this area in this div using js ...?
My html code looks like this:
<div class="scroll-inner-container">
<div class="paragraph-space content">
<h1>top position</h1>
<p>Lorem ipsum dolor...</p>
<h1>end position</h1>
</div>
my css code for this div:
.scroll-inner-container{
height: -moz-calc(70vh + 0px);
height: -webkit-calc(70vh + 0px);
height: calc(70vh + 0px);
overflow: auto;
object-fit: cover;
background-color: yellow;
position: relative;
}
source
share