联系站长! 傻子-跸西blog 傻子-跸西微blog
顶部

底部
Feed on
Posts
Comments

搞悬浮真的搞了不是一个月了,一直都在搞一直都搞的很恶心,有时候IE6能用firefox就不能用了,有时候firefox可以用IE6又不能用了,花了点时间总算筛选出来一套好用的悬浮代码,见下文

css部分


/*——————————————————*/
/* xuanfu Styles */
/*——————————————————*/
* {
padding: 0;
margin:0;
}

* html #dock { position: absolute; top: expression((460 + (ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop)) + ‘px’); }
#dock_wrap > #dock { position: fixed; top:76%; left:0px; margin-left:0px; }
#dock_wrap { position: relative; z-index: 20;}
* html #ceding { position: absolute; top: expression((460 + (ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop)) + ‘px’); }

#ceding_wrap { position: relative; z-index: 20;}
#ceding { position:fixed; top:50%; left:50%; margin-left:492px; }

#dock { width:80px; overflow:hidden}
#ceding a:hover, #dock a:hover {
border-bottom:none;
}
#ceding img,#dock img { margin:0!important;padding:0!important;}

html部分

联系站长!
傻子-跸西blog
傻子-跸西微blog

几点要注意的
1、css文件要加载css文件较靠上位置
2、html文件随便+哪里都可以.
3、img src=”xxxx”其中xxx内容你自己弄图片OK结束了

兼容IE6 和火狐

有什么想法,说两句吧