CSS 网页顶部固定工具栏拖动无闪烁实现代码
2010-03-03 00:00
465 查看
实际上细心的朋友会发现,这个顶部的工具条实则是一个平铺的背景图像,CSS起到固定背景的作用,也算是一种独特的实现方法。
顶部拖动无闪烁菜单栏
*
{
margin: 0px;
padding: 0px;
}
body {
background-image: url();
background-attachment: fixed;
}
#topNavWrapper {
width: 980px;
text-align: left;
height: 31px;
margin: 0px auto;
z-index:100;
_position: relative ;
_top:0px;
}
#topNav {
width: 980px;
float: left;
display: block;
z-index: 100;
overflow: visible;
position: fixed;
top: 0px; /* position fixed for IE6 */
_position: absolute;
_top: expression(documentElement.scrollTop + "px");
background-image: url(/upload/2010-3/20100303232637297.gif);
background-repeat: no-repeat;
background-position: right;
height: 31px;
}
脚本之家
[Ctrl+A 全选 注:如需引入外部Js需刷新才能执行]
顶部拖动无闪烁菜单栏
*
{
margin: 0px;
padding: 0px;
}
body {
background-image: url();
background-attachment: fixed;
}
#topNavWrapper {
width: 980px;
text-align: left;
height: 31px;
margin: 0px auto;
z-index:100;
_position: relative ;
_top:0px;
}
#topNav {
width: 980px;
float: left;
display: block;
z-index: 100;
overflow: visible;
position: fixed;
top: 0px; /* position fixed for IE6 */
_position: absolute;
_top: expression(documentElement.scrollTop + "px");
background-image: url(/upload/2010-3/20100303232637297.gif);
background-repeat: no-repeat;
background-position: right;
height: 31px;
}
脚本之家
[Ctrl+A 全选 注:如需引入外部Js需刷新才能执行]
相关文章推荐
- CSS 网页顶部固定工具栏拖动无闪烁实现代码
- css实现网页”回到顶部“的代码效果
- CSS实现网页“回到顶部”的效果代码
- 去一家公司面试时候即兴用CSS实现横向二级菜单_网页代码站(www.webdm.cn)
- JS+CSS实现自动切换的网页滑动门菜单效果代码
- 网页html/css为一行代码,怎么实现换行
- CSS实现横向、竖向两个选项卡联动_网页代码站(www.webdm.cn)
- JS+CSS实现自动切换的网页滑动门菜单效果代码
- 用css实现网页背景渐变的代码
- 用网页技术CSS实现网页背景渐变的四种代码设置
- CSS实现网页顶部的阴影效果
- 在IE和Firefox火狐中实现网页中的图层透明的CSS代码
- JS+CSS实现闪烁字体效果代码
- JS+CSS实现出现在网页左侧可折叠在线客户代码
- 用css实现网页背景渐变的代码
- JS实现的网页背景闪电闪烁效果代码
- jQuery实现网页顶部固定导航效果代码
- JS实现的网页背景闪电闪烁效果代码
- 网页内容实现太长实现返回顶部的代码
- 可拖动带动画的滑出式展开菜单代码(Js+Css实现)