Setting boundary limits for a draggable object

前端 未结 4 475
借酒劲吻你
借酒劲吻你 2020-12-31 18:53

I have two elements:

1. A parent of fixed height, overflow:hidden

2. Its child, of larger fixed height.

4条回答
  •  醉话见心
    2020-12-31 19:35

    I had the same problems and the answers didn't help me. Some javascript later I think the following is a better solution.

    (Anybody knows how to turn this into a jQuery plugin?)

    
    
    
        Draggable limited to the container
        
        
        
        
    
    
        

提交回复
热议问题