解决input position:fixed 问题


$( ".big_input"). on( "click", function(){
var target= this;
setTimeout( function(){
target. scrollIntoView( true);
}, 100)
})

//调用方法为 element.scrollIntoView() 参数默认为true。

//参数为true时调用该函数,页面(或容器)发生滚动,使element的顶部与视图(容器)顶部对齐;

//参数为false时,使element的底部与视图(容器)底部对齐。

//TIPS:页面(容器)可滚动时才有用!

百度到解决input position:fixed 问题,分享一下

注意,要去掉input 或包含input的容器的position:fixed 的定位才行。


猜你喜欢

转载自blog.csdn.net/qq_40101922/article/details/80973094