| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <style> | |
| .box { | |
| width: 250px; | |
| height: 250px; | |
| margin: 10px; | |
| background-color: green; | |
| box-sizing: border-box; | |
| -webkit-mask-image: linear-gradient(black, transparent); | |
| border: 5px solid black; | |
| } | |
| .composited { | |
| transform: translateZ(0); | |
| } | |
| </style> | |
| </head> | |
| <body> | |
| <p>Both boxes should look the same, and show a fade to the bottom.</p> | |
| <div class="masked composited box"></div> | |
| <div class="masked composited box" style="-webkit-transform-style: preserve-3d;"></div> | |
| </body> | |
| </html> |