Use CSS3 transform to fit element perfectly

54 views Asked by At

I'm trying to fit a youtube video to a phone's display but I can't figure out the perfect values. There's always a corner that not fits.

    transform: rotate3d(-131,-46,54,-53deg) skew(-5deg) skewX(10.2deg) skewY(1.9deg) perspective(82px) rotateY(1deg) scaleX(1) scaleY(1.1);

jsFiddle

Without the #layer 's z-index, you can see clearly that the top left corner is not fits.

0

There are 0 answers