导航栏按钮 - 页面"跳跃" (单击按钮时(或在导航栏上方创建空白区域)

时间:2015-09-01 08:06:14

标签: html css

单击导航按钮会导致整个导航栏跳转并在下一页加载时插入空格。我该如何解决这个问题?

点击前:http://i60.tinypic.com/zv1web.jpg

点击后(下一页加载时):http://i58.tinypic.com/2cz8vsw.jpg

以下是NAV按钮的 HTML

    <a ng-class="{active: $location.path().substring(1) === page.path}" class="item ng-binding ng-scope" ng-repeat="page in headerMenu" ng-href="/explore" href="/explore">Explore</a>

CSS

.main-menu.ui.inverted.menu .nav-wrap .item {
  padding: 1.8em 1em;
}

.main-menu.ui.inverted.menu .nav-wrap .item {
  padding: 1.8em 1em;
}

.ui.menu .item {
  font-size: 1rem;
}
.ui.menu .item {
  position: relative;
  display: inline-block;
  padding: .78571em .95em;
  vertical-align: middle;
  line-height: 1;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-transition: opacity .2s ease,background .2s ease,box-shadow .2s ease;
  transition: opacity .2s ease,background .2s ease,box-shadow .2s ease;
}

0 个答案:

没有答案