模拟position:fixed(ie6);
一:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>scroll</title>
<style type="text/css">
*{ margin:0; padding:0;}
html{height:100%; overflow:hidden;}
body{height:100%; overflow:hidden;}
#scroll{width:100%; height:100%; position:relative; overflow-y:scroll; overflow-x:auto; text-align:right;}
.relContent
{
height:1000px;
}
#other{
text-align:left;
position:absolute;
left:0; top:0;
}
</style>
</head>
<body>
<div id="scroll"><div class="relContent">页面真正的内容区域</div></div>
<div id="other">放置各种浮动层的区域</div>
</body>
</html>
二:或者直接在样式里写
_top:expression(eval(document.documentElement.scrollTop + 具体的值));
分享到:
相关推荐
position: fixed;这个属性用起来确实很方便,可以轻松的实现固定位置的浮动层效果。但是,它不支持IE6及以下版本。于是很多同学使用JS模拟。今天写了一个DEMO,涉及左侧、右侧。及上下两边,共四种位置的固定,与...
Sticky的作用相当于relative和fixed的结合体,当修饰的目标节点再屏幕中时表现为relative,当要超出的时候是fixed的形式展现,因为这个特性,我们就可以来实现一个sticky的模拟效果。 sticky组件实现 template部分 ...
本文实例讲述了CSS实现模拟position的fixed页面定位效果的方法。分享给大家供大家参考。具体实现方法如下: 复制代码代码如下:<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” ...
1、参与测试的浏览器:IE6 / IE7 / IE8 / FF3 / OP9.6 / SF3 / Chrome2 ... 但ie6总不支持它,所以用其他的属性来模拟(这个模拟在主流浏览器中都兼容,所以其他浏览器也不需要分开写position:fixed了)。 看效果先:[h
scroll-bar { position : fixed; right : 0 px ; top : 0 px ; width : 10 px ; background : transparent; z-index : 99999 ; overflow : hidden; }. scroll-bar . handle { position : absolute; left : 0 px ; ...
1. 简介 要想让你的购物车有种高大上的感觉,加入特效的功能是必不可少的。 2. 实现思路 设置一些简单的样式 模拟把它添加到购物车中,数量增加 ... position: fixed; margin-left: 50px; z-index: 9
vue-route-transition vue router 切换动画 特性 模拟前进后退动画 基于css3流畅动画 基于sessionStorage,页面刷新... 主要是解决transform动画,position:fixed异常问题 像往常一样使用 npm i vue-route-transit
-重新设计模拟树的下拉列表的实现,避免选中某项后的闪烁。 +2009-11-21 v2.1.5 +Tree优化。 -修正Expanded项和Checked项的状态在回发改变后不能保持的BUG。 -GetNodeById更名为FindNode,保持和...
-重新设计模拟树的下拉列表的实现,避免选中某项后的闪烁。 +2009-11-21 v2.1.5 +Tree优化。 -修正Expanded项和Checked项的状态在回发改变后不能保持的BUG。 -GetNodeById更名为FindNode,保持和...
The computed value of the position property for element A is fixed. 2,If A is an area ...
1.css的概述 1.问题 ... 2.css的语法规范 1.... 1.... 样式声明:用样式属性和值组成(属性:值;... 属性:background-position: 取值: 1.x y x: 背景图片水平偏移距离 取正向下右 取负向左 y: 背景图片...
7.11.2 位置和角度(Position and Angle) 223 7.11.3 阻尼(Damping) 223 7.11.4 休眠参数(Sleep Parameters) 224 7.11.5 固定旋转(Fixed Rotation) 224 7.11.6 子弹(Bullets) 224 7.11.7 活动状态...