不用JS 控制悬浮DIV
2012-11-07 15:13
288 查看
转自 http://blog.csdn.net/xiaonieya/article/details/5876745
<html>
<head>
<title>- 网页特效 - CSS特效 - 不用JS也能让工具栏悬浮于网页顶部(兼容所有浏览器)</title>
<!--以下为可用代码区域(其他代码均属附带请去除)-->
<style type="text/css">
body {
background: url(http://hexun.com/homephoto3/20100610/10763793/bk04-31-47.gif) center center fixed;
}
.wwwy1_blog_hexun_com {
position:fixed !important;
top:200px;
left: 50%;
margin-left:-468px;
position:absolute;
top:expression(offsetParent.scrollTop+200);
text-align: center;
border: 1px solid #dddddd;
border-top: none;
background: #ffffff;
width:934px;
height:200px
}
</style>
<head>
<body>
<DIV class="wwwy1_blog_hexun_com">
不用JS也能让工具栏悬浮于网页顶部(兼容所有浏览器)
</DIV>
<!--以上为可用代码区域(其他代码均属附带请去除)-->
<DIV style="text-align: center;">
<BR>
<BR>
文章内容<BR><BR>
文章内容<BR><BR>
文章内容<BR><BR>
文章内容<BR><BR>
文章内容<BR><BR>
文章内容<BR><BR>
文章内容<BR><BR>
文章内容<BR><BR>
文章内容<BR><BR>
文章内容<BR><BR>
文章内容<BR><BR>
文章内容<BR><BR>
文章内容<BR><BR>
文章内容<BR><BR>
文章内容<BR><BR>
文章内容<BR><BR>
文章内容<BR><BR>
文章内容<BR><BR>
文章内容<BR><BR>
文章内容<BR><BR>
文章内容<BR><BR>
文章内容<BR><BR>
文章内容<BR><BR>
文章内容<BR><BR>
文章内容<BR><BR>
文章内容<BR><BR>
文章内容<BR><BR>
文章内容<BR><BR>
文章内容<BR><BR>
文章内容<BR><BR>
文章内容<BR><BR>
文章内容<BR><BR>
文章内容<BR><BR>
文章内容<BR><BR>
文章内容<BR><BR>
文章内容<BR><BR>
文章内容<BR><BR>
文章内容<BR><BR>
文章内容<BR><BR>
文章内容<BR><BR>
</DIV>
<DIV style="text-align: center;">
hi、看到了么?<BR>
xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
</DIV>
</body>
</html>
<html>
<head>
<title>- 网页特效 - CSS特效 - 不用JS也能让工具栏悬浮于网页顶部(兼容所有浏览器)</title>
<!--以下为可用代码区域(其他代码均属附带请去除)-->
<style type="text/css">
body {
background: url(http://hexun.com/homephoto3/20100610/10763793/bk04-31-47.gif) center center fixed;
}
.wwwy1_blog_hexun_com {
position:fixed !important;
top:200px;
left: 50%;
margin-left:-468px;
position:absolute;
top:expression(offsetParent.scrollTop+200);
text-align: center;
border: 1px solid #dddddd;
border-top: none;
background: #ffffff;
width:934px;
height:200px
}
</style>
<head>
<body>
<DIV class="wwwy1_blog_hexun_com">
不用JS也能让工具栏悬浮于网页顶部(兼容所有浏览器)
</DIV>
<!--以上为可用代码区域(其他代码均属附带请去除)-->
<DIV style="text-align: center;">
<BR>
<BR>
文章内容<BR><BR>
文章内容<BR><BR>
文章内容<BR><BR>
文章内容<BR><BR>
文章内容<BR><BR>
文章内容<BR><BR>
文章内容<BR><BR>
文章内容<BR><BR>
文章内容<BR><BR>
文章内容<BR><BR>
文章内容<BR><BR>
文章内容<BR><BR>
文章内容<BR><BR>
文章内容<BR><BR>
文章内容<BR><BR>
文章内容<BR><BR>
文章内容<BR><BR>
文章内容<BR><BR>
文章内容<BR><BR>
文章内容<BR><BR>
文章内容<BR><BR>
文章内容<BR><BR>
文章内容<BR><BR>
文章内容<BR><BR>
文章内容<BR><BR>
文章内容<BR><BR>
文章内容<BR><BR>
文章内容<BR><BR>
文章内容<BR><BR>
文章内容<BR><BR>
文章内容<BR><BR>
文章内容<BR><BR>
文章内容<BR><BR>
文章内容<BR><BR>
文章内容<BR><BR>
文章内容<BR><BR>
文章内容<BR><BR>
文章内容<BR><BR>
文章内容<BR><BR>
文章内容<BR><BR>
</DIV>
<DIV style="text-align: center;">
hi、看到了么?<BR>
xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
</DIV>
</body>
</html>
相关文章推荐
- js控制div显示与隐藏
- Ferris这个教程学习笔记:js示例1.1:控制div属性
- js控制显示隐藏DIV
- js控制div点击隐藏显示
- 个人笔记 js 02 控制div的显示及隐藏(js控制iframe的显示及隐藏)
- js 获取div的类及js控制图片垂直居中
- JS控制打印指定div
- js控制div弹出层实现方法
- js控制三列高度自适应DIV+CSS页面
- 通过JS控制外部CSS样式表,使一定大小的DIV在浏览器中动态居中
- 原生js实现键盘控制div移动且解决停顿问题
- JS控制DIV,淡出效果实例应用(聊天表情的淡出选择)
- 不用JS也能让工具栏悬浮于网页顶部(兼容所有浏览器)
- js实现DIV的一些简单控制
- js控制的DIV一些属性 scrollLeft,scrollWidth,clientWidth,offsetWidth .
- 不用js多浏览器兼容纯DIV/CSS对联漂浮广告代码
- js控制:div 超过高度,自动分页
- 用JS来控制DIV窗口的宽高
- js实现div跟谁鼠标悬浮移动显示
- 简单js控制div的显示与隐藏