For a projet I need to make a page with three areas each shaped differently.
Like this :
The contact point must always be in the middle of the page and each area has an image as a background. Clicking anywhere on a specific area redirects you to another page.
I already tried with SVG but I can't get the image to keep the same aspect ratio but the SVG to resize according to the page
html, body {
margin: 0;
height: 100%;
}
svg {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100vh;
}
<svg viewBox="0 0 1920 1080" version="1.1" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="none">
<pattern id="image" patternUnits="userSpaceOnUse" width="1920" height="1080" x="0" y="0">
<image xlink:href="https://upload.wikimedia.org/wikipedia/commons/3/38/Bangalore_Panorama_edit1.jpg" x="0" y="0" width="100%" height="100%" preserveAspectRatio="xMinYMax slice"/>
</pattern>
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="Artboard">
<polygon id="top" points="960 540 0 2.27373675e-13 1920 0" fill="red"></polygon>
<polygon id="left" points="960 1080 0 1080 0 0 960 540"></polygon>
<polygon id="bottom" points="960 1080 960 540 1920 0 1920 1080" fill="blue"></polygon>
<use href="#left" fill="url(#image)"></use>
</g>
</g>
</svg>
