最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

jQuery實(shí)現(xiàn)div浮動(dòng)層跟隨頁面滾動(dòng)效果

 更新時(shí)間:2014年02月11日 10:18:49   作者:  
這篇文章主要介紹了jQuery實(shí)現(xiàn)div浮動(dòng)層跟隨頁面滾動(dòng)效果,需要的朋友可以參考下
復(fù)制代碼 代碼如下:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords" content="滾動(dòng),漂浮層,php,jquery" />
<meta name="description" content="Helloweba演示平臺(tái),演示XHTML、CSS、jquery、PHP案例和示例" />
<title>jQuery實(shí)現(xiàn)浮動(dòng)層跟隨頁面滾動(dòng)效果</title>
<link rel="stylesheet" type="text/css" href="../css/main.css" />
<style type="text/css">
#main{height:2000px}
.demo{width:180px; height:250px; margin:10px; border:2px solid #ccc; background:#eee; padding:10px; }
#demo1{position:relative; margin-top:-290px;}
#demo2{position:absolute; margin-top:156px; right:10px;}
.demo a{text-decoration:underline; cursor:pointer}
.demo h3{font-size:14px}
.demo p{line-height:20px}
</style>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript" src="jquery.cookie.js"></script>
<script type="text/javascript" src="jquery.scroll-follow.js"></script>
<script type="text/javascript">
$(function(){
$("#demo1").scrollFollow({
offset: 156
});
$("#demo2").scrollFollow({
speed:1000,
//offset: 156,
//relativeTo:"bottom",
killSwitch: "switchlink",
onText: '取消滾動(dòng)',
offText: '開啟滾動(dòng)'
});
});
</script>
</head>

<body>
<div id="demo1" class="demo">
<img src="pic.jpg" align="" />
<h3>Demo 1</h3>
<p>滾動(dòng)鼠標(biāo)滾輪或者拖動(dòng)瀏覽器的滾動(dòng)條看看。</p>
</div>
<div id="demo2" class="demo">
<img src="pic1.jpg" align="" />
<h3>Demo 2</h3>
<p>你可以通過點(diǎn)擊下面的鏈接來開啟和關(guān)閉浮動(dòng)層的跟隨滾動(dòng)效果。</p>
<p><a id="switchlink">啟動(dòng)開關(guān)</a></p>
</div>
<div id="header">
<div id="logo"><h1><a title="返回helloweba首頁">helloweba</a></h1></div>
</div>


<div id="main">
<h2 class="top_title"><a >jQuery實(shí)現(xiàn)浮動(dòng)層跟隨頁面滾動(dòng)效果</a></h2>
</div>
<div id="footer">
<p>Powered by helloweba.com 允許轉(zhuǎn)載、修改和使用本站的DEMO,但請注明出處:<a >www.helloweba.com</a></p>
</div>
<p id="stat"><script type="text/javascript" src="http://js.#linezing.com/1870888/#js"></script></p>

</body>
</html>

相關(guān)文章

最新評論

竹溪县| 岢岚县| 荣成市| 武汉市| 周口市| 宣恩县| 安多县| 色达县| 蒲江县| 十堰市| 睢宁县| 卢龙县| 庆城县| 汝阳县| 石门县| 苏尼特左旗| 河曲县| 巴塘县| 苍南县| 泗洪县| 定西市| 海盐县| 伊通| 仁布县| 营山县| 永兴县| 绥滨县| 当雄县| 铜山县| 宣城市| 承德市| 砀山县| 武邑县| 黔南| 湖北省| 博罗县| 南华县| 大洼县| 文成县| 新沂市| 瑞金市|