Dynamic circle menus with SASS

Developer
Size
3,928 Kb
Views
12,144

How do I make an dynamic circle menus with sass?

Update the $itemCount variable in the SASS to reflect the amount of li's in the markup, and watch it just work. Only javascript need is for click events!. What is a dynamic circle menus with sass? How do you make a dynamic circle menus with sass? This script and codes were developed by Adam Grayson on 10 November 2022, Thursday.

Dynamic circle menus with SASS Previews

Dynamic circle menus with SASS - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Dynamic circle menus with SASS</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.min.css"> <link rel="stylesheet" href="css/style.css">
</head>
<body>
<nav> <div class="center"> <div class="copy">Select an Option</div> </div> <ul> <li data-value="Option 1"> <div class="contents icon1"></div> </li> <li data-value="Option 2"> <div class="contents icon2"></div> </li> <li data-value="Option 3"> <div class="contents icon3"></div> </li> <li data-value="Option 4"> <div class="contents icon4"></div> </li> <li data-value="Option 5"> <div class="contents icon5"></div> </li> <li data-value="Option 6"> <div class="contents icon6"></div> </li> <li data-value="Option 7"> <div class="contents icon6"></div> </li> <li data-value="Option 8"> <div class="contents icon6"></div> </li> </ul>
</nav> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>

Dynamic circle menus with SASS - Script Codes CSS Codes

html, body { width: 100%; height: 100%; background-color: #aacedb;
}
nav { top: 50%; left: 50%; width: 250px; height: 250px; position: relative; -webkit-transform: translate(-50%, -50%); transform: translate(-50%, -50%);
}
nav .center { top: 50%; left: 50%; z-index: 1; width: 100px; height: 100px; background: white; position: absolute; border-radius: 50%; -webkit-transform: translate(-50%, -50%); transform: translate(-50%, -50%); box-shadow: 0 3px 5px rgba(0, 0, 0, 0.4);
}
nav .center .copy { top: 50%; left: 50%; text-align: center; position: relative; -webkit-transform: translate(-50%, -50%); transform: translate(-50%, -50%); font-family: "TrebuchetMS", trebuchet, sans-serif;
}
nav ul { width: 100%; height: 100%; overflow: hidden; position: relative; border-radius: 50%; box-shadow: 0 3px 5px rgba(0, 0, 0, 0.4);
}
nav ul li { top: 0; left: 0; width: 50%; height: 50%; cursor: pointer; position: absolute; -webkit-transform-origin: 100% 100%; transform-origin: 100% 100%; background-color: rgba(255, 255, 255, 0.5);
}
nav ul li.active { background-color: white;
}
nav ul li:hover { background-color: rgba(255, 255, 255, 0.25);
}
nav ul li:hover.active { background-color: white;
}
nav ul li .contents { width: 50%; height: 50%; right: 18px; bottom: 10px; position: absolute; background-size: 50%; background-position: center; background-repeat: no-repeat;
}
nav ul li:nth-child(0) { -webkit-transform: rotate(-45deg) skew(45deg); transform: rotate(-45deg) skew(45deg);
}
nav ul li:nth-child(0) .contents { -webkit-transform: skew(-45deg) rotate(45deg); transform: skew(-45deg) rotate(45deg);
}
nav ul li:nth-child(1) { -webkit-transform: rotate(0deg) skew(45deg); transform: rotate(0deg) skew(45deg);
}
nav ul li:nth-child(1) .contents { -webkit-transform: skew(-45deg) rotate(0deg); transform: skew(-45deg) rotate(0deg);
}
nav ul li:nth-child(2) { -webkit-transform: rotate(45deg) skew(45deg); transform: rotate(45deg) skew(45deg);
}
nav ul li:nth-child(2) .contents { -webkit-transform: skew(-45deg) rotate(-45deg); transform: skew(-45deg) rotate(-45deg);
}
nav ul li:nth-child(3) { -webkit-transform: rotate(90deg) skew(45deg); transform: rotate(90deg) skew(45deg);
}
nav ul li:nth-child(3) .contents { -webkit-transform: skew(-45deg) rotate(-90deg); transform: skew(-45deg) rotate(-90deg);
}
nav ul li:nth-child(4) { -webkit-transform: rotate(135deg) skew(45deg); transform: rotate(135deg) skew(45deg);
}
nav ul li:nth-child(4) .contents { -webkit-transform: skew(-45deg) rotate(-135deg); transform: skew(-45deg) rotate(-135deg);
}
nav ul li:nth-child(5) { -webkit-transform: rotate(180deg) skew(45deg); transform: rotate(180deg) skew(45deg);
}
nav ul li:nth-child(5) .contents { -webkit-transform: skew(-45deg) rotate(-180deg); transform: skew(-45deg) rotate(-180deg);
}
nav ul li:nth-child(6) { -webkit-transform: rotate(225deg) skew(45deg); transform: rotate(225deg) skew(45deg);
}
nav ul li:nth-child(6) .contents { -webkit-transform: skew(-45deg) rotate(-225deg); transform: skew(-45deg) rotate(-225deg);
}
nav ul li:nth-child(7) { -webkit-transform: rotate(270deg) skew(45deg); transform: rotate(270deg) skew(45deg);
}
nav ul li:nth-child(7) .contents { -webkit-transform: skew(-45deg) rotate(-270deg); transform: skew(-45deg) rotate(-270deg);
}
nav ul li:nth-child(8) { -webkit-transform: rotate(315deg) skew(45deg); transform: rotate(315deg) skew(45deg);
}
nav ul li:nth-child(8) .contents { -webkit-transform: skew(-45deg) rotate(-315deg); transform: skew(-45deg) rotate(-315deg);
}
.icon1 { background-image: url("http://cdn.flaticon.com/png/256/64096.png");
}
.icon2 { background-image: url("http://cdn.flaticon.com/png/256/64201.png");
}
.icon3 { background-image: url("http://cdn.flaticon.com/png/256/64274.png");
}
.icon4 { background-image: url("http://cdn.flaticon.com/png/256/64023.png");
}
.icon5 { background-image: url("http://cdn.flaticon.com/png/256/64410.png");
}
.icon6 { background-image: url("http://cdn.flaticon.com/png/256/64113.png");
}

Dynamic circle menus with SASS - Script Codes JS Codes

(function() { var $centerCopy, $navUlLi; $centerCopy = $('.center .copy'); $navUlLi = $('nav ul li'); $navUlLi.click(function() { var $this, value; $this = $(this); value = $this.attr('data-value'); $centerCopy.text(value); $navUlLi.removeClass('active'); return $this.addClass('active'); });
}).call(this);
Dynamic circle menus with SASS - Script Codes
Dynamic circle menus with SASS - Script Codes
Home Page Home
Developer Adam Grayson
Username agrayson
Uploaded November 10, 2022
Rating 3
Size 3,928 Kb
Views 12,144
Do you need developer help for Dynamic circle menus with SASS?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

Adam Grayson (agrayson) Script Codes
Create amazing video scripts with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!