I am developing a thoroughly CSS-based website which necessitates the usage of z-index
several times, ranging in value from -10000
to the upwards of 50000
.
Does the usage of z-index
measurably increase the amount of time a supported browser takes the render the webpage? Is z-index
considered a good practice or are there other alternatives which are either (1) faster to render and/or (2) more generally acceptable?
Z-index are relative, not absolute. An element with z-index 1,000,000 renders in front of elements with lower z-index and behind elements with higher z-index. If does not mean that the browser will create 1,000,000 layers.
I think it is the number of distinct z-indexes (stacking contexts to be more precise) that matters.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With