How to create a Menu Icon with CSS?

CSSWeb DevelopmentFront End Technology

To create a Menu Icon with CSS, the code is as follows −

Example

 Live Demo

<!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 −

raja
Published on 03-Apr-2020 10:59:28
Advertisements