My website has navigation, presented as a list of rectangular buttons with round corners .
Each button should have its own custom background, which is a photograph. A photo is larger than a button and should move in response to mouse movement above that button. We have the effect, as if we were viewing a window.
Navigation has the following HTML structure: "ul> li> a> img".
I think each "ul> li" should be a rectangle with a round corner and act as a clipping mask for the image.
Setting "overflow: hidden;" does't work because the clipping region is a simple rectangle without round corners.
CSS properties, as shown below, work in Webkit browsers, but not in Firefox.
mask-image: url(/images/mask.png);
mask-position: 0 0;
mask-repeat: no-repeat no-repeat;
mask-size: 125pt 77pt;
What is a cross browser way?
source
share