<!DOCTYPE html> <style> #mask { width: 200px; height: 100px; -webkit-mask-box-image: url(../../fast/backgrounds/resources/dot.png) 3; background-color: green; } </style> <div id="mask"></div>