Element with scroll until touchs top of screen

I'm having trouble with something that I think should be easy. I'd like an element to have normal scrolling, but when it touchs the top of the screen, it stops scrolling. How can I do this? thanks