Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/76.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/37.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 链接在滚动后停止工作_Html_Css - Fatal编程技术网

Html 链接在滚动后停止工作

Html 链接在滚动后停止工作,html,css,Html,Css,我试图使我的网站有一个顶部标题,可以移动周围的平滑滚动,平滑滚动工程,但一旦我有顶部标题移动周围的平滑滚动链接停止工作 HTML: 其他材料: #home { background: url(background.jpeg) 50% 0 repeat none; min-height: 1000px; height: 1000px; margin: 0 auto; width: 100%; max-width: 1920px; position: relati

我试图使我的网站有一个顶部标题,可以移动周围的平滑滚动,平滑滚动工程,但一旦我有顶部标题移动周围的平滑滚动链接停止工作

HTML:

其他材料:

#home { 
  background: url(background.jpeg) 50% 0 repeat none; min-height: 1000px; 
  height: 1000px; 
  margin: 0 auto; 
  width: 100%; 
  max-width: 1920px; 
  position: relative; 
}

#home article { 
  height: 458px; 
  position: absolute; 
  text-align: center; 
  top: 150px; 
  width: 100%; 
}

#about { 
  background: url(Background-2.png) 50% 0 repeat fixed; min-height: 1000px; 
  height: 1000px; 
  margin: 0 auto; 
  width: 100%; 
  max-width: 1920px; 
  position: relative; 
  -webkit-box-shadow: 0 0 50px rgba(0,0,0,0.8);
  box-shadow: 0 0 50px rgba(0,0,0,0.8);
}

#about article { 
  height: 458px; 
  position: absolute; 
  text-align: center; 
  top: 150px; 
  width: 100%; 
}

看起来你的代码很好。为什么不将文件移动到同一文件夹中并删除file:///Users/tc10077403/Desktop/Project%206/

您可能有一个div或其他DOM元素阻止滚动导航

测试方法:尝试用tab键指向链接(确保没有将大纲设置为“无”),然后按ENTER键激活链接。如果这样做有效,那么它可能位于另一个DOM元素下


请发布一个我们可以查看的链接。

如“标题”中所述,我的意思是菜单很可能是JS问题,因为HTML看起来很好,您能创建一个JSFIDLE重现您的问题吗?另外,您正在使用的平滑滚动库是什么?同意@Pogrindis,这看起来不错;也许你也应该加入一些html部分。我被告知我的视差滚动正在阻止锚定标记。。。我完全不知道这意味着什么。听起来像是你们的内容,当你们把卷轴放在上面时,它会移动进来。一种修复方法是为nav容器提供更高的z索引。
.Bob{
position: fixed;
}
.nav1{
text-align: center;
margin-left: 350px;
background-color: #333333;
}
#home { 
  background: url(background.jpeg) 50% 0 repeat none; min-height: 1000px; 
  height: 1000px; 
  margin: 0 auto; 
  width: 100%; 
  max-width: 1920px; 
  position: relative; 
}

#home article { 
  height: 458px; 
  position: absolute; 
  text-align: center; 
  top: 150px; 
  width: 100%; 
}

#about { 
  background: url(Background-2.png) 50% 0 repeat fixed; min-height: 1000px; 
  height: 1000px; 
  margin: 0 auto; 
  width: 100%; 
  max-width: 1920px; 
  position: relative; 
  -webkit-box-shadow: 0 0 50px rgba(0,0,0,0.8);
  box-shadow: 0 0 50px rgba(0,0,0,0.8);
}

#about article { 
  height: 458px; 
  position: absolute; 
  text-align: center; 
  top: 150px; 
  width: 100%; 
}