Despite the fact that, when defining the perspective
property for an element, it is the CHILD elements that get the perspective view, NOT the element itself, you still have to call on your child element, and assign your desired CSS perspective properties to it, in order to have it running cross-browser. The codes below are working 100% an any existing browser;
html {
background-color: #111;
background-image: url(https://upload.wikimedia.org/wikipedia/commons/thumb/e/ed/W3C%C2%AE_Icon.svg/210px-W3C%C2%AE_Icon.svg.png);
background-repeat: no-repeat;
}
div {
height: 100px; line-height: 100px;
font-size: 40px;
color: #fff;
background: linear-gradient(to bottom, #000, orange);
mix-blend-mode: screen;
}
.background-image{
perspective: 50px; // calling on child element and applying the perspective
}
What was the issue?
Defining your perspective properties under the HTML
tag causes issues for cross-browsers compatibility, as you may have numerous elements under your main html
tag, and the browser may not distinguish how and which element to apply it to. It is true that the perspective property only affects 3D transformed elements, but it's not a guaranty that any browsers detects and applies it to the image specified as a main background.
I hope it helped.