+ 1

Is there any alternative of z-index ?

Some times z-index doesn't work. So is there any alternative of z-index that we use to stack the elements in a order we want. And also can any one tell why sometimes z-index doesn't work? If any one fill the same please drop your project link in comment-box !

21st Jul 2019, 10:53 PM
Aditya Raj
Aditya Raj - avatar
1 Odpowiedź
0
I think the reason that z index sometimes doesn't work is there is a limit to specify how big or small z-index can be . Here is text quoted from https://www.sitepoint.com/managing-css-stacking-contexts-hostile-environment/ "The CSS specs do not mention an upper limit for z-index but there is a maximum value because of the type of variable used to store that value (a 32-bit signed integer); thus the limit in modern browsers is 2,147,483,647." Now about alternative 🤔. I think transform:translateZ(); should also work same as it moves elements back and forth in 3d space. https://developer.mozilla.org/en-US/docs/Web/CSS/transform-function/translateZ
22nd Jul 2019, 12:38 AM
🇮🇳Omkar🕉
🇮🇳Omkar🕉 - avatar