I'm trying to do a reflection in javascript since some browsers do not support the webkit css reflection. I created another image and inverted it while decreasing its opacity. Example: https://jsfiddle.net/dppt48cm/1/ .
refImage.onload = function(){
refImage.style.position = "absolute";
refImage.style.left = "0px";
refImage.style.top = "400px";
refImage.style.transform = "scaleY(-1)";
refImage.style.opacity = "0.4";
divElement.appendChild(refImage);
}
I'm setting the "reflection" here but creating another image.
What I'm trying to do now is to adjust the length of the reflection. For example, I don't want to show the head of the dog in the reflection. Would it be possible to stop the reflection at the nose or set the reflection in pixels?