Home  >  Article  >  Web Front-end  >  网页元素定位动态变换问题_html/css_WEB-ITnose

网页元素定位动态变换问题_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-21 09:47:281413browse

本帖最后由 wlx1991 于 2013-11-28 14:00:04 编辑

html css Javascript 元素定位 网页布局

雅虎首页(yahoo.com),当向下浏览页面,页面左侧和右侧的内容已经到底,而中间仍有内容时,中间内容还可以继续向下滑动,左侧和右侧都停留在各自的最低端(如图一左、右侧),而不会显示空白(如图二右侧)。




回复讨论(解决方案)

js获取页面滚动的高度,当滚动高度和浏览器窗口高度大于左侧的文档高度时,将左侧需要悬浮的部分改为position:fixed,IE6下用position:absolute模拟fixed。
右侧同理。

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