CSS:
.layers {
position: relative;
height: 500px;
width: 500px;
/* Some -webkit and -moz transformations */
}
.layers > div {
position: absolute;
height: 500px;
width: 500px;
}
.item {
position: absolute;
width: 5px;
height: 5px;
}
HTML:
<article class="someclass">
<section class="layers">
<div style="/* -webkit and -moz transformations */">
<img src='image.png'>
<div class="item" style="/* -webkit and -moz transformations */">test</div>
</div>
</section>
</article>
When loading this page, I get image.png
with test
on top of it 90% of the time
.
(exact position depends on the transformations)
The other 10% of the times I try loading the page, the item
div is loaded as if the position is static which causes it not to be on top the the image.
My best guess is that it has something to do with what what gets loaded first, so there might not be an exact answer, but maybe there is something else I'm forgetting here.
Note: I tried this on Chrome and Safari, both the same results.