Rotation-Menu-1.10

by velo_ninja

HTML

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Dynamic Menu with Submenus</title>    
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
    <style>
      body {
        margin: 0;
        padding: 0;
        font-family: Arial, sans-serif;
        background-color: white;
      }
      .circle-menu {background-color: orange;}
      
      .menu-item:hover {background-color: white;}
      .submenu-container li {
        margin: 5px 0;
        padding: 10px;
        background-color: #f44336; /* Red background for submenu items */
        color: #ffffff;
        border-radius: 5%;
        cursor: pointer;
        transition: background-color 0.3s ease;
      }      
      .submenu-container {
        position: absolute;
        background-color: white;
        padding: 3px;
        border-radius: 5px;

        min-width: 150px;
        left: 100%;
        margin-left: 10px;
        z-index: 1000;
        white-space: nowrap;
      }
      .submenu-container li:hover {background-color: red;}
      .fa-folder-o {color: red;}        
      .icon-and-text {
        display: flex;
        align-items: center;
        gap: 5px; /* Space between icon and text */
      }
      .degree-mark {
        position: absolute;
        width: 1px;
        height: 1px;
        background-color: white;
      }
      .degree-label {
        position: absolute;
        font-size: 10px;
        color: white;
        text-align: center;    
      }
    </style>
    
    <script>   
    		const globalIcons = {};
        // Array of icon configurations
        const iconConfigurations = [
          { iconID: 'folder', iconClass: 'fa-folder', iconSize: 'fa-2x', color: 'orange' },
          { iconID: 'file', 	iconClass: 'fa-file', 	iconSize: 'fa-1x', color: 'white' },
        ];
        
         // Menu data example
 ...

CSS

.menu-item {
  position: relative;
  width: 100px;
  height: 40px;
  border-radius: 5px;
  font-size: 15px;
  color: white;  
  background-color: #3498db;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);  
  transition: background-color 0.3s ease, transform 0.3s ease;
}