Hexagon switch

Size
2,219 Kb
Views
12,144

How do I make an hexagon switch?

What is a hexagon switch? How do you make a hexagon switch? This script and codes were developed by James Crockford on 19 November 2022, Saturday.

Hexagon switch Previews

Hexagon switch - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Hexagon switch</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div class="hex"></div>
</body>
</html>

Hexagon switch - Script Codes CSS Codes

html { height: 100%;
}
body { height: 100%; display: flex; align-items: center; justify-content: center;
}
.hex { background: #ff0080; box-shadow: inset 0 0 0 1px #ff0080; -webkit-transition: 0.5s; -moz-transition: 0.5s; transition: 0.5s; width: 10em; height: 5.75em; position: relative; margin: 3em 0;
}
.hex:before, .hex:after { box-shadow: inherit; position: absolute; top: 0; left: 0; content: " "; display: block; width: 100%; height: 100%; background: inherit;
}
.hex:before { -webkit-transform: rotate(60deg) translate3d(0, 0, 0); -moz-transform: rotate(60deg) translate3d(0, 0, 0); -ms-transform: rotate(60deg) translate3d(0, 0, 0); -o-transform: rotate(60deg) translate3d(0, 0, 0); transform: rotate(60deg) translate3d(0, 0, 0);
}
.hex:after { -webkit-transform: rotate(-60deg) translate3d(0, 0, 0); -moz-transform: rotate(-60deg) translate3d(0, 0, 0); -ms-transform: rotate(-60deg) translate3d(0, 0, 0); -o-transform: rotate(-60deg) translate3d(0, 0, 0); transform: rotate(-60deg) translate3d(0, 0, 0);
}
.hex:hover { width: 3.3333em; background: rgba(255, 0, 128, 0.2);
}
Hexagon switch - Script Codes
Hexagon switch - Script Codes
Home Page Home
Developer James Crockford
Username james_crockford
Uploaded November 19, 2022
Rating 3.5
Size 2,219 Kb
Views 12,144
Do you need developer help for Hexagon switch?

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!

James Crockford (james_crockford) Script Codes
Create amazing blog posts 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!