Menu circulaire
by Simon Hi
HTML
<nav>
<img src="https://nsa40.casimages.com/img/2020/10/10/201010024853704242.png">
<a href="#">Menu 1</a>
<a href="#">Menu 2</a>
<a href="#">Menu 3</a>
<a href="#">Menu 4</a>
<a href="#">Menu 5</a>
</nav>
CSS
body {
min-width: 19em;
min-height: 19em;
}
nav {
position: relative;
min-width: 9.5em;
min-height: 9.5em;
max-width: 50vmin;
margin: 10% auto 0 auto;
}
nav>img {
display: block;
width: 100%;
height: auto;
}
nav>a {
display: block;
height: 1.5em;
line-height: 1.5em;
position: absolute;
white-space: nowrap;
border: 1px solid #0c0;
}
nav>a:nth-of-type(1) {
top: calc(15% - 0.75em);
left: calc(85% + 10%);
}
nav>a:nth-of-type(2) {
top: calc(50% - 0.75em);
left: calc(100% + 10%);
}
nav>a:nth-of-type(3) {
bottom: calc(15% - 0.75em);
left: calc(85% + 10%);
}
nav>a:nth-of-type(4) {
top: calc(15% - 0.75em);
right: calc(85% + 10%);
}
nav>a:nth-of-type(5) {
top: calc(50% - 0.75em);
right: calc(100% + 10%);
}