Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/71.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
为什么转换:影响jquery ScrollTop函数_Jquery_Css_Css Transforms - Fatal编程技术网

为什么转换:影响jquery ScrollTop函数

为什么转换:影响jquery ScrollTop函数,jquery,css,css-transforms,Jquery,Css,Css Transforms,$(窗口).on('scroll load',函数(){ var隐藏点=200; var stickPoint=400; if($(this).scrollTop()>stickPoint){ $('.sticky header').addClass('stick'); }else if($(this).scrollTop()>hidePoint){ $('.sticky header').removeClass('stick'); } }); html{ -webkit字体平滑:抗锯齿!重要;

$(窗口).on('scroll load',函数(){
var隐藏点=200;
var stickPoint=400;
if($(this).scrollTop()>stickPoint){
$('.sticky header').addClass('stick');
}else if($(this).scrollTop()>hidePoint){
$('.sticky header').removeClass('stick');
}
});
html{
-webkit字体平滑:抗锯齿!重要;
字体平滑:抗锯齿!重要;
文本呈现:优化易读性!重要;
宽度:100%;
身高:100%;
位置:相对位置;
溢出x:隐藏;
}
身体{
背景色:#FFF;
颜色:#888;
字体大小:13px;
字体大小:400;
线高:1.8!重要;
身高:100%;
位置:相对位置;
}
.粘头{
高度:100px;
宽度:500px;
背景色:#ff8000;
位置:相对位置;
文本对齐:居中;
}
.粘头{
位置:固定;
}
.填料{
高度:100px;
}

粘头
填料
填料
填料
填料
填料
填料
填料
填料
填料
填料
填料
填料
填料
填料

向我们显示代码。CSS、jQuery和HTML,最好做一个JSFIDLE感谢您的关注。您将看到,如果从正文中删除style=“transform:translateX(-100px);”,则粘性标题将起作用。@CreativelyCoded这很有趣:您的小提琴在IE(10和edge)上运行良好。这永远不会发生