To create a Menu Icon with CSS, the code is as follows −
Example
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
div {
width: 40px;
height: 7px;
background-color: blue;
margin: 5px 2px;
}
</style>>
</head>
<body>
<h2>Sample Menu Icon</h2>
<div></div>
<div></div>
<div></div>
</body>
</html>Output
This will produce the following output −
