Modal View stuck to bottom of page

Hi,

I want to create CSS where the modal view can be placed at the bottom of the page. The modal transitions from bottom to top, and fixes itself to the screen at the bottom (very similar to action sheet).

Any help is appreciated.

Thanks

I have found this codepen -http://codepen.io/mhartington/pen/LzDja

But how do i dynamically allocate height of the modal - some modals might have larger screen size and some smaller, and I want to automaticallly control height from CSS - is this possible?