| <!DOCTYPE html> |
| <html> |
| <head> |
| <style> |
| .container { |
| position: relative; |
| margin: 20px; |
| } |
| .box { |
| position: absolute; |
| top: 0; |
| left: 0; |
| width: 200px; |
| height: 200px; |
| background-color: silver; |
| } |
| .composited { |
| transform: translateZ(1px); |
| } |
| .sibling { |
| top: 300px; |
| background-color: gray; |
| } |
| .negative { |
| z-index: -1; |
| background-color: red; |
| } |
| .positive { |
| z-index: 1; |
| background-color: green; |
| } |
| </style> |
| </head> |
| <body> |
| <div class="container"> |
| <div class="composited child box"> |
| <div class="negative box"> </div> |
| <div class="composited positive box"> </div> |
| </div> |
| <div id="target" class="composited sibling box"> </div> |
| </div> |
| </body> |
| </html> |