Implementation Code of DIV scrolling with the scroll bar [recommended], div scroll bar
I remember writing this code was troublesome. Now JQuery is much simpler, just a few lines of code!
<Script type = "text/javascript" src = "Js/jquery-1.7.2.min.js"> </script> <script type = "text/javascript"> $ (function () {$ (window ). scroll (function () {var top = $ (window ). scrollTop () + 200; var left = $ (window ). scrollLeft () + 320; $ ("# editInfo" ).css ({left: left + "px", top: top + "px "});});}); </script> <div id = "editInfo" style = "float: left; width: 300px; background-color: # ccc; position: absolute; top: 200px; "> <div> User name: <input type =" text "/> </div> <div> password: <input type = "text"/> </div> <div> Age: <input type = "text"/> </div> <div> note: <input type = "text"/> </div> <input type = "button" value = "save"/> </div>
The implementation code [recommended] of the above DIV scrolling with the scroll bar is all the content shared by the small editor. I hope you can give us a reference, and hope you can also support the help house.