包含div的图像向上移动 [英] image containing div moves upward

查看:87
本文介绍了包含div的图像向上移动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在与母版页连接的asp内容页面中有一个包含背景图像的div

我的问题是当我们使用鼠标向下移动浏览器的滚动条或使用键盘的向下箭头键来查看内容时页脚或类似的东西,当浏览器的滚动条向上移动时,asp页面向上移动,反之亦然,asp页面向下移动。



i使用了style = position:绝对对于div而且还尝试使用style =position:fixed但是这不适用于母版页内容并且已经使用了来自堆栈溢出的
jqueries,但它仍然不起作用。



请帮帮我。

解决方案

试试这样



 <   div     style   = 溢出:自动;高度:100px;宽度:自动   >  
您的控件
< / div >


i have a div containing background image in asp content page connected with master page
my problem is when we moves scrollbar of browser downward using mouse or by using down arrow key of keyboard to see content of footer or something like that the asp page is moved upward and vice versa when scroll bar of browser is moved upward the asp page is moved down.

i have used style="position:absolute" for div and also tried using style="position:fixed" but that doesn't work with master page content and have used
jqueries from stack overflow but still it didn't work.

pls help me out with this .

解决方案

Try like this

<div style="overflow:auto; height:100px; width:auto " >
                    your controls
                </div>


这篇关于包含div的图像向上移动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆