| <!DOCTYPE html> |
| <style> |
| #container { |
| height: 760px; |
| width: 260px; |
| border: solid black; |
| display: inline-block; |
| } |
| .box { |
| position: relative; |
| width: 200px; |
| height: 200px; |
| margin: 30px; |
| border: 10px solid black; |
| background-color: rgba(100, 100, 255, 0.8); |
| -webkit-box-sizing: border-box; |
| -webkit-box-shadow: black 0 4px 4px; |
| } |
| |
| #container .masked-px { |
| -webkit-mask-image: url(resources/alpha-gradient.png); |
| -webkit-mask-repeat: repeat; |
| -webkit-mask-size: calc(50px); |
| } |
| |
| #container .masked-percent { |
| -webkit-mask-image: url(resources/alpha-gradient.png); |
| -webkit-mask-repeat: repeat; |
| -webkit-mask-size: calc(25%); |
| } |
| |
| #container .masked-percent-px { |
| -webkit-mask-image: url(resources/alpha-gradient.png); |
| -webkit-mask-repeat: repeat; |
| -webkit-mask-size: calc(10% + 30px); |
| } |
| </style> |
| <p>Testing masks on compositing layers.</p> |
| <div id="container"> |
| <div class="masked-px box"></div> |
| <div class="masked-percent box"></div> |
| <div class="masked-percent-px box"></div> |
| </div> |