大家好, 我想设置汉堡包图标而不是文本。我能够设置背景图像,但文本不会出现。以下是我的代码
#mobileMenuLink ul li { background:url('https://static1.squarespace.com/static/5adfd10929711421a9b29d21/t/5ae49f061ae6cfa83d2ba0ad/1524933475120/images.png?format=100w') no-repeat; }
}
答案 0 :(得分:1)
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
div {
width: 35px;
height: 5px;
background-color: black;
margin: 6px 0;
}
</style>
</head>
<body>
<p>A menu icon:</p>
<div></div>
<div></div>
<div></div>
</body>
</html>
&#13;