- index.html
- style.css
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<title>Preparing the round menu</title>
<meta charset="utf-8">
<link rel="stylesheet" href="style.css">
</head>
<body>
<nav class="circle-menu">
<div class="center"></div>
<ul>
<li><a href="#"></a></li>
<li><a href="#"></a></li>
</ul>
</nav>
</body>
</html>
CSS
body {
margin: 0;
padding: 0;
background-color: #f5f5f5;
}
.circle-menu {
position: relative;
width: 400px;
height: 400px;
margin: 50px auto;
background-color: white;
box-shadow: 0 0 3px #cccccc;
}
.circle-menu ul {
position: absolute;
width: 300px;
height: 300px;
margin: 50px;
padding: 0;
list-style: none;
box-shadow: 0 0 0 1px #3498db;
}
.circle-menu .center {
position: absolute;
top: 195px;
left: 195px;
z-index: 1000;
border: 5px solid #34495e;
border-radius: 50%;
box-shadow: 0 0 3px #cccccc;
}
.circle-menu li {
width: 160px;
height: 160px;
background-color: rgba(145, 145, 145, 0.1);
box-shadow: inset 0 0 1px #cccccc;
}
You’ve gone to a different page
Goalscompleted
0
- Assign an absolute position to the list items.
- Assign the value
-10px
to the propertiestop
andleft
. - And also assign the value
100% 100%
totransform-origin
.
Comments