Menu toggle with unicode icons

Size
2,730 Kb
Views
36,432

How do I make an menu toggle with unicode icons?

What is a menu toggle with unicode icons? How do you make a menu toggle with unicode icons? This script and codes were developed by Orion Drummond on 22 August 2022, Monday.

Menu toggle with unicode icons Previews

Menu toggle with unicode icons - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Menu toggle with unicode icons</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"> <style> /* NOTE: The styles were added inline because Prefixfree needs access to your styles and they must be inlined if they are on local disk! */ menu { font-size: 4rem;
}
input[id=open] ~ menu label { display: inline-block; transition: opacity 0.33s ease-in-out, transform 0.33s ease-in-out;
}
input[id=open] ~ menu label[for=close] { opacity: 0; visibility: hidden; transform: rotateZ(45deg); font-weight: 700;
}
input[id=open]:checked ~ menu label[for=open] { opacity: 0; visibility: hidden; transform: rotateZ(-45deg) scale(1.25); animation: vis-switch 0.3333s;
}
input[id=open]:checked ~ menu label[for=close] { opacity: 1; transform: none; visibility: visible; animation: vis-switch 0.3333s;
}
input[id=close]:checked ~ menu label { opacity: 1; visibility: visible; animation: vis-switch-1 0.3333s;
}
input[id=close]:checked ~ menu label[for=close] { opacity: 0; visibility: hidden; animation: vis-switch-1 0.3333s;
}
menu { position: relative; width: 1em; height: 1em; line-height: 1;
}
menu label { position: absolute;
}
@keyframes vis-switch { 0% { visibility: visible; } 99% { visiblity: visible; }
}
@keyframes vis-switch-1 { 0% { visibility: visible; } 99% { visiblity: visible; }
} </style> <script src="https://cdnjs.cloudflare.com/ajax/libs/prefixfree/1.0.7/prefixfree.min.js"></script>
</head>
<body> <input type="radio" name="open" id="open">
<input type="radio" name="open" id="close">
<menu> <label for="open">☰</label> <label for="close">✕</label>
</menu>
</body>
</html>

Menu toggle with unicode icons - Script Codes CSS Codes

menu { font-size: 4rem;
}
input[id=open] ~ menu label { display: inline-block; transition: opacity 0.33s ease-in-out, transform 0.33s ease-in-out;
}
input[id=open] ~ menu label[for=close] { opacity: 0; visibility: hidden; transform: rotateZ(45deg); font-weight: 700;
}
input[id=open]:checked ~ menu label[for=open] { opacity: 0; visibility: hidden; transform: rotateZ(-45deg) scale(1.25); animation: vis-switch 0.3333s;
}
input[id=open]:checked ~ menu label[for=close] { opacity: 1; transform: none; visibility: visible; animation: vis-switch 0.3333s;
}
input[id=close]:checked ~ menu label { opacity: 1; visibility: visible; animation: vis-switch-1 0.3333s;
}
input[id=close]:checked ~ menu label[for=close] { opacity: 0; visibility: hidden; animation: vis-switch-1 0.3333s;
}
menu { position: relative; width: 1em; height: 1em; line-height: 1;
}
menu label { position: absolute;
}
@keyframes vis-switch { 0% { visibility: visible; } 99% { visiblity: visible; }
}
@keyframes vis-switch-1 { 0% { visibility: visible; } 99% { visiblity: visible; }
}
Menu toggle with unicode icons - Script Codes
Menu toggle with unicode icons - Script Codes
Home Page Home
Developer Orion Drummond
Username tappily
Uploaded August 22, 2022
Rating 3
Size 2,730 Kb
Views 36,432
Do you need developer help for Menu toggle with unicode icons?

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!

Orion Drummond (tappily) Script Codes
Create amazing captions 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!