我有一个网站:CLICK。这就是a.nav-toggle。在pc上查看时,它通常位于中心位置,但当我在手机上访问该页面时,我会跳起来。css:
.nav-toggle{
position: absolute;
right: -50px;
top: 0;
width: 50px;
height: 50px;
background: #404040;
line-height: 45px;
text-decoration: none;
text-align: center;
/* border-bottom-right-radius: 3px; */
box-shadow: 1px 0 3px #404040;
outline: 0;
}
.nav-toggle:before {
content: "\2192";
font-weight: 600;
color: white;
display: inline-block;
}
.nav-side.nav-open .nav-toggle:before{
content: "\2190";
} 发布于 2018-03-15 01:23:14
我无法使用Chrome开发工具中的设备工具栏功能复制问题,但是,我假设你的意思是当移动设备的搜索栏(在移动屏幕标题的顶部)关闭时,当你滚动网页时,这会影响你的导航栏。
如果您添加了
overflow: hidden;
对于css类.nav-open,而不是.nav-toggle,这将修复滚动页面时的随机行为。
https://stackoverflow.com/questions/49282723
复制相似问题