不知大家遇到过这种问题么,一个层宽度设为100%,并设置背景图片,在浏览器中浏览,缩小窗口到滚动条出现,然后拖动滚动条到右侧,右侧的区域变成空白,怎么解决?_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 12:22:51
Original
1145 people have browsed it

不知大家遇到过这种问题么,一个层宽度设为100%,并设置背景图片,在浏览器中浏览,缩小窗口到滚动条出现,然后拖动滚动条到右侧,右侧的区域变成空白,再拖大窗口,又能占满窗口了,请问是怎么回事,该怎么解决呢?


回复讨论(解决方案)

遇到过,这个你要监测浏览器窗口的变化了
用这个方法

window.onresize
Copy after login

拖动滚动条的时候可以监测么?

onscroll,有这个事件。

是不是窗口没有及时刷新

我这有一种情况跟你的差不多 HTML标签加了背景色 然后BODY里是背景图片也出现那种现象 把HTML标签里的背景色去掉就好了

看看先

这问题我遇到过,真好好解决啊!

source:php.cn
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!