I have this code on my site:
.fixed-background {
position: absolute;
top: 0;
left: 0;
height: 100%;
width: 100%;
overflow: hidden;
}
img {
height: auto;
width: auto;
min-width: 100%;
min-height: 100%;
}
<a href="https://pt.stackoverflow.com" target="_blank">
<img class="fixed-background"
src="http://s3.amazonaws.com/rapgenius/cats-animals-kittens-background.jpg"/></a>
Iwantedonlytheeyeofthecattobeclickable,butalsothattheimagefitthesizeofthebrowser(widthandheight),ietheimagehastohittop,bottomandlefttagsregardlessofbrowsersize.
Itriedwithmap
andarea
butIcouldnotbecausetheimagehasnofixedsize.HowcanIdothis?
Example in jsfiddle