I am trying to create a code for a new site where there is a large splash background as a “hero” image. Like on this site, but as a video, where the image of a lady unloads a car: https://www.simple.com
Resize and you will see how the image always fits into the parent.
I put the part of the code that I worked on in JSBin here (didn't make much progress): http://jsbin.com/ruqisa/1/edit
It seems like I am not getting the same behavior with CSS. I want the video to go beyond the parent both in width and in height, depending on the size of the screen.
Has anyone done this using pure CSS? JS I could calculate it manually when resizing, but I would really like to do it using only CSS.
EDIT: I'm not looking for the whole page to be video, just the background title.
source
share