六月婷婷综合激情-六月婷婷综合-六月婷婷在线观看-六月婷婷在线-亚洲黄色在线网站-亚洲黄色在线观看网站

明輝手游網中心:是一個免費提供流行視頻軟件教程、在線學習分享的學習平臺!

橫向不間斷滾動效果代碼

[摘要]完整DIV+CSS+JS不間斷橫向滾動代碼:<!DOCTYPE html><html><head><meta http-equiv="Content-Type" content="text/html; charset=gb23...
完整DIV+CSS+JS不間斷橫向滾動代碼:

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>橫向不間斷滾動DIV</title>
</head>
<body>
<style>
.scroll_div {width:600px; height:49px;margin:0 auto; overflow: hidden; white-space: nowrap; background:#ffffff;}
.scroll_div img {width:120px;height:49px;border: 0;margin: auto 8px; }
#scroll_begin, #scroll_end, #scroll_begin ul, #scroll_end ul, #scroll_begin ul li, #scroll_end ul li{display:inline;}/* 設置ul和li橫排 */
</style>
<script language="javascript">
function ScrollImgLeft(){
var speed=20
var scroll_begin = document.getElementById("scroll_begin");
var scroll_end = document.getElementById("scroll_end");
var scroll_div = document.getElementById("scroll_div");
scroll_end.innerHTML=scroll_begin.innerHTML
function Marquee(){
if(scroll_end.offsetWidth-scroll_div.scrollLeft<=0)
scroll_div.scrollLeft-=scroll_begin.offsetWidth
else
scroll_div.scrollLeft++
}
var MyMar=setInterval(Marquee,speed)
scroll_div.onmouseover=function() {clearInterval(MyMar)}
scroll_div.onmouseout=function() {MyMar=setInterval(Marquee,speed)}
}
</script>
<h2 align="center"><a href="http://www.php.cn/">DIV</a>演示說明:向左滾動</h2>
<div style="text-align:center">
<div class="sqBorder">
<!--#####滾動區域#####-->
<div id="scroll_div" class="scroll_div">
<div id="scroll_begin">
<ul>
<li><a href="http://www.php.cn/"><img src="http://www.php.cn/img/css-logo.gif" /></a></li>
<li><a href="http://www.php.cn/"><img src="http://www.php.cn/img/css-logo.gif" /></a></li>
<li><a href="http://www.php.cn/"><img src="http://www.php.cn/img/css-logo.gif" alt="div css" /></a></li>
<li><a href="http://www.php.cn/"><img src="http://www.php.cn/img/css-logo.gif" /></a></li>
<li><a href="http://www.php.cn/"><img src="http://www.php.cn/img/css-logo.gif" alt="divcss" /></a></li>
<li><a href="http://www.php.cn/"><img src="http://www.php.cn/img/css-logo.gif" /></a></li>
<li><a href="http://www.php.cn/"><img src="http://www.php.cn/img/css-logo.gif" /></a></li>
<li><a href="http://wwwphp.cn/"><img src="http://www.php.cn/img/css-logo.gif" /></a></li>
</ul>
</div>
<div id="scroll_end"></div>
</div>
<!--#####滾動區域#####-->
</div>
<script type="text/javascript">ScrollImgLeft();</script>
</div>
<!--//向左滾動代碼結束-->
</body></html>

相信看了這些案例你已經掌握了方法,更多精彩請關注php中文網其它相關文章!

相關閱讀:

駝峰命名與JS的問題解答

前端的js框架總結以及用途講解

JS里的布爾值、關系運算符、邏輯運算符的詳解及實例

以上就是橫向不間斷滾動效果代碼的詳細內容,更多請關注php中文網其它相關文章!


網站建設是一個廣義的術語,涵蓋了許多不同的技能和學科中所使用的生產和維護的網站。




主站蜘蛛池模板: 天天躁日日躁狠狠躁中文字幕 | 视频一区在线 | 天堂在线资源最新版 | 青青碰| 亚洲最大成人 | 日韩福利网 | 伊人久热这里只有精品视频99 | 日韩一卡 二卡 三卡 四卡 免费视频 | 中文字幕乱码一二三四区 | 天天干天天插天天射 | 日夜啪啪 | 日本视频免费 | 一级一级 a爱片免费视频 | 性生活一区| 日韩欧美亚洲视频 | 香港三级欧美国产精品 | 日韩欧美在 | 欧美一区二区三区四区在线观看 | 三级黄色片免费 | 青娱乐精品视频 | 天堂在线xw | 日韩精品福利视频一区二区三区 | 天天爱天天做天天干 | 速度与激情9完整版免费观看 | 夜夜快播 | 日本在线视频网址 | 夜夜狠狠狠狠 | 午夜在线观看免费高清在线播放 | 先锋影音在线资源站大全 | 亚洲综合色丁香婷婷六月图片 | 欧美一欧美一区二三区性 | 亚洲免费人成 | 日本狠狠干| 欧美特级一级片 | 欧美一级淫片免费播放40分钟 | 日日噜噜噜夜夜爽爽狠狠 | 最近更新免费中文字幕大全 | 日韩毛片免费视频 | 日韩精品国产自在欧美 | 欧美最猛性xxxxx(亚洲精品) | 亚洲mv日韩mv欧美mv |