Say you have a tile image that you use to create an isometric map. Each tile is selectable. The problem is that the transparent corners around the tile image overlap the tiles behind them. I want the transparent area of the image to be ignored so that other tiles can be more precisely selected.
Here is an example of such a tile. The outline is made red, so it is easy to see the transparent area.
We use a browser that supports pointer-event
. I was wondering if there is a way to include this in the corner areas, or if I need to find a way for the program to recognize transparent pixels on its own.
These tile images are not constructed using canvas. CSS is simple:
div.content { position: absolute; top: 105px; width: 10px; height: 50%; } div.content div.tile { width:96px; position: absolute; height:102px; line-height:96px; background-image:url('images/tiles.png'); } div.content div.tile:hover { opacity:0.8; }
source share