Jquery 页面内锚在Firefox中不起作用

Jquery 页面内锚在Firefox中不起作用,jquery,html,css,firefox,anchor,Jquery,Html,Css,Firefox,Anchor,我的页面内锚标记有问题。单击向下箭头时, 我是特拉斯克 •项目符号1•项目符号2 只需删除标记,在这种情况下没有意义,因为您不需要按钮,而需要图标。在下面的代码片段中,我将您的.button类分配给父div,并删除了button元素本身 我还添加了此选项,以消除箭头链接下方的下划线: .button a { text-decoration: none; } $(函数(){ $('a[href*=“#”]:不是([href=“#”]”)。单击(函数(){ if(location.path

我的页面内锚标记有问题。单击向下箭头时,

我是特拉斯克
•项目符号1
•项目符号2

只需删除
标记,在这种情况下没有意义,因为您不需要按钮,而需要图标。在下面的代码片段中,我将您的
.button
类分配给父div,并删除了button元素本身

我还添加了此选项,以消除箭头链接下方的下划线:

.button a {
  text-decoration: none;
}

$(函数(){
$('a[href*=“#”]:不是([href=“#”]”)。单击(函数(){
if(location.pathname.replace(/^\/,'')==this.pathname.replace(/^\/,'')和&location.hostname==this.hostname){
var target=$(this.hash);
target=target.length?target:$('[name='+this.hash.slice(1)+']');
if(目标长度){
$('html,body')。设置动画({
scrollTop:target.offset().top
}, 1000);
返回false;
}
}
});
});
@导入url(http://weloveiconfonts.com/api/?family=fontawesome);
[class*=“fontawesome-”]:之前{
字体系列:“FontAwesome”,无衬线;
}
* {
-webkit框大小:边框框;
-moz框大小:边框框;
-ms框尺寸:边框框;
框大小:边框框;
}
* {
字体系列:“Helvetica Neue”,衬线;
字体重量:较轻;
字母间距:1px;
}
.阿罗{
颜色:黑色;
字号:5em;
-o-转变:.5s;
-ms转换:.5s;
-moz转变:.5s;
-webkit转换:.5s;
过渡:.5s;
}
.箭头:悬停{
颜色:浅灰色;
}
.按钮{
背景色:透明;
边框颜色:透明;
左边距:50%;
保证金权利:50%;
边缘底部:250px;
}
.按钮a{
文字装饰:无;
}
#两个{
高度:800px;
}

我是特拉斯克
•项目符号1
•项目符号2


。这就解决了问题。谢谢