Home  >  Article  >  Web Front-end  >  How do you achieve the effect that the DIV of this page does not scroll with the scroll bar? Who can help me solve it? It would be better if there are ready-made simple codes_html/css_WEB-ITnose

How do you achieve the effect that the DIV of this page does not scroll with the scroll bar? Who can help me solve it? It would be better if there are ready-made simple codes_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 12:08:151291browse

http://www.dealsdirect.com.au/p/samsung-pl120-14-2mp-5x-zoom-digital-camera-pink/

For details on the product above, click on the product After the picture, a DIV with a large picture of the product pops up.
If you drag the scroll bar at this time, the DIV does not move with the scroll bar at all.
How is this done? I really want to get this effect!!

I also know the effect of some DIVs moving with the scroll bar, but the effect is not good.
When the scroll bar scrolls, the DIV moves "bounce by bounce".
Who can help me?


Reply to discussion (solution)

Looking at the source code directly, I think it should be
position: fixed;
top: 100px;
left: 100px;
z-index: 999;
and the like

I took a look. . The scroll bar controls the original page. . And doesn’t control the big picture. . You can go and study its code. . See how the big picture is output. .

I found it

"http://www.w3.org/ TR/xhtml1/DTD/xhtml1-strict.dtd">


. .....

IE6 uses the way the container handles overflow content





......

{position:fixed}

< ;/div>


position:fixed; This attribute controls the

JQuery ready-made Plug-in http://www.helloweba.com/demo/scroll-follow/

Statement:
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