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

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