How can position absolute scroll with the page!

< tr >
< td > <% = I% > < / td >
< td > < input type= "checkbox" class= "checkbox" value= "<% = I% >" > < / td >
< td > C20180712001 < / td >
< td > Shanghai Wanxiang Automobile Manufacturing Co., Ltd. < / td >
< td >

< td > <% = date ()% > < / td > < td >

Save scroll down, div position
clipboard.png

div
clipboard.png

how to change css to make div scroll with the scroll bar.

Css
Mar.28,2021

is it useless for you to set position:relative for the parent element?


so far, no one has been found to achieve this effect only through CSS, but there are other general implementation ideas:

assume that the element

is x from the top scrolling height, and the scrolling height of the listening browser:

  1. when the scrolling height of the browser is greater than or equal to x , set the css of this element to position: fix; top: 0
  2. restore the browser when its scrolling height is less than x .

the following is the JQuery code:

.xxx.fix {
    position: fixed;
    top: 0;
}
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3be8e-2b634.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3be8e-2b634.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?