Home > Web Front-end > JS Tutorial > Summary of 4 methods to make div floating layer, scroll bar move and keep position unchanged_javascript skills

Summary of 4 methods to make div floating layer, scroll bar move and keep position unchanged_javascript skills

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-05-16 17:09:58
Original
1367 people have browsed it

The div remains at the top and the scroll bar scrolls, but the div is still at the top! Upload the source code directly:

Method 1:

Copy the code The code is as follows:




div floating layer, scroll bar moves, Keep position unchanged




ddd

























< br>











< ;br>





















< br>


































<























< br>











< ;br>


















方法二:
复制代码 代码如下:


 
 

 


















 


















 


















 


















 


  居中的层



方法三:
复制代码 代码如下:


 
 

 居中的层
 



方法四:[采用css来居中]
复制代码 代码如下:







始终在中间DIV (支持IE FF)




















Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
Float a div inside another div
From 1970-01-01 08:00:00
0
0
0
javascript - div carousel issue
From 1970-01-01 08:00:00
0
0
0
Div captures mouse scroll
From 1970-01-01 08:00:00
0
0
0
How to make a div appear below another div in CSS
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template