您的位置:首页 > Web前端 > CSS

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需刷新才能执行]
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: