如何使用 CSS 创建菜单图标?
cssweb developmentfront end technology更新于 2025/9/26 14:04:17
要使用 CSS 创建菜单图标,代码如下 −
示例
<!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>
输出
这将产生以下输出 −
![]()
相关文章
有用资源
css 参考教程 - 该教程包含有关 css 的更多信息:https://www.cainiaomax.com/css/

