div, css positioning div css positioning
The company needs to make a page similar to the Renren timeline, so it needs to keep the relative screen position of the timeline unchanged when the page is scrolled. This requires position:fixed to position the div of the timeline, that is, specify left, top, right and other positions to specify the fixed position of the div. For example, I can position it with position:fixed;left:1000px;top:100px. Fixed relative browser positioning, you can listen to the onresize event, and when the window width is less than 1000px or the height is less than 100px, give the top and left of the div Reassign a value to make it visible.
window.onresize =function(){
//....
}
fixed relative to the browser positioning, you can listen to the onresize event, when the window width is less than 1000px or the height is less than At 100px, reassign a value to the top and left of the div to make it visible.
window.onresize =function(){
//....
}
Thank you. I haven't read any replies today.
That’s what I did.
Still grateful.