我很难弄清楚为什么移动菜单图标不会显示在以下网站上:
您会看到,如果您将尺寸缩小到更小的尺寸,那么在右上角有一个确实会调出移动菜单的链接。但是应该在那里显示的图像却没有。
#nav-toggle {
position: absolute;
top: 0;
right: 0;
display: block;
width: 54px;
height: 44px;
overflow: hidden;
text-indent: -9999px;
-webkit-user-select: none;
background: url('http://www.cap-acp.org/_images/icon-res-menu.png') center center no-repeat; }
@media screen and (min-width: 767px) {
.js #nav {
position: relative;
}
.js #nav.closed {
max-height: none;
}
#nav-toggle {
display: none;
}
}
最佳答案
您的图像是透明的 .png,只有白色条,所以它就在那里,但您无法在白色背景下看到它。您可以通过向背景 CSS 声明添加背景颜色来验证这一点,例如:
background: red url('http://www.cap-acp.org/_images/icon-res-menu.png') center center no-repeat
关于html - 移动菜单问题/图标不显示,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38528709/