我需要在红色矩形触摸几秒钟后将每个项目的每个列的中心定位并检测哪个项目更位于红色矩形内,以移动到中心。
<div id="snap"></div><!--- center here a .item on touch and overlap after x seconds --->
<div class="cont-area"></div>
<div class="overflow-items" id="comere">
<div class="cont-items">
<div class="item">
1
</div>
<div class="item">
2
</div>
<div class="item">
3
</div>
<div class="item">
4
</div>
<div class="item">
1
</div>
<div class="item">
2
</div>
<div class="item">
3
</div>
<div class="item">
4
</div>
</div>
</div>