Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试创建一个响应式网站,这是 URL http://waverin.com。我能够使其响应并且导航栏几乎可以工作。唯一的问题是在移动设备上它提供了一个小滚动条,使它看起来不那么优雅。
尝试在此处删除负右边距:
@media (max-width: 767px) { .navbar-fixed-top, .navbar-fixed-bottom, .navbar-static-top { margin-right: -20px; margin-left: -20px; }
因为 divposition: static处于该宽度,负的右边距会导致该元素膨胀 20 像素,从而获得滚动。
position: static