The left-hand suspended QR code will follow the page up or down and end up in its original position.
<Divstyle= "background:red; width:1000px; height:7000px; margin:auto;"> </Div><DivID= "AA"style= "position:absolute;right:0px; top:4600px;"><imgsrc= "001.jpg"/></Div><Script>functionScrollx (p) {varD=DOCUMENT,DD=d.documentelement,db=d.body,w=Window,o=d.getElementById (p.id), IE6= /MSIE 6/i.test (navigator.useragent), Style,timer; if(o) {o.style.csstext+=";p osition:"+(P.F&&!IE6?'fixed':'Absolute')+";"+(P.L==undefined?'left:0;':'Left :'+P.L+'px;')+(p.t!=undefined?'Top:'+p.t+'px':'bottom:0'); if(P.F&&IE6) {O.style.csstext+='; Left:expression (Documentelement.scrollleft +'+(P.L==undefined?Dd.clientwidth-O.OFFSETWIDTH:P.L)+'+ "px"); Top:expression (Documentelement.scrolltop +'+(p.t==undefined?Dd.clientheight-o.offsetheight:p.t)+'+ "px");'; Dd.style.cssText+='; Background-image:url (About:blank); background-attachment:fixed;'; }Else{ if(!p.f) {W.onresize=W.onscroll= function() {clearinterval (timer); Timer=SetInterval (function(){ //dual choice to fix chrome under XHTML parsing when Dd.scrolltop is 0 varSt=(Dd.scrolltop||db.scrolltop), C; C=St-O.offsettop+(p.t!=undefined?p.t: (W.innerheight||dd.clientheight)-o.offsetheight); if(c!=0) {O.style.top=O.offsettop+Math.ceil (Math.Abs (c)/* (c<0?-1:1) + ' px '; }Else{clearinterval (timer); } },Ten}}}}} Scrollx ({ID:'AA', T: -, }) /*ID you want to scroll the contents of the ID l the position of the horizontal axis is not written as close to the right t you want to put on the page of the location by default is affixed to the bottom 0 is affixed to the top side F 1 means fixed not write or 0 means scrolling*/</Script>
JS implementation Floating box follow the page scroll, and finally stay in the original position