導航:首頁 > 圖片大全 > 如何做圖片滾動代碼

如何做圖片滾動代碼

發布時間:2024-01-21 10:55:53

A. 如何用html實現文本+圖片輪流滾動顯示

就是無縫滾動

用js就可以

1、打開Dreamweaver軟體

2、代碼如下: 不要忘了引入js庫


<!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" />

<title>js無縫滾動製作js文字無縫滾動和js圖片無縫滾動</title>

<meta name="description" content="js無縫滾動製作多種無縫滾動效果js文字無縫滾動和js圖片無縫滾動,直接復制副本標簽js無縫滾動代碼。內含js代碼下載。" />

</head>


<body>

<style type="text/css">

*{margin:0;padding:0;list-style-type:none;font-size:12px;}

a,img{border:0;}


.scroll{height:300px;width:500px;margin:50px auto;border:solid 1px #ddd;}

.scroll p{line-height:28px;padding:5px 0;border-bottom:dashed 1px #ddd;text-align:center;}

.scroll p a{color:#3366cc;text-decoration:none;}

</style>


<script type="text/javascript">

function addEventSimple(obj,evt,fn){

if(obj.addEventListener){

obj.addEventListener(evt,fn,false);

}else if(obj.attachEvent){

obj.attachEvent('on'+evt,fn);

}

}


addEventSimple(window,'load',initScrolling);


var scrollingBox;

var scrollingInterval;

var reachedBottom=false;

var bottom;


function initScrolling(){

scrollingBox = document.getElementById('xst');

scrollingBox.style.overflow = "hidden";

scrollingInterval = setInterval("scrolling()",50);

scrollingBox.onmouseover = over;

scrollingBox.onmouseout = out;

}


function scrolling(){

var origin = scrollingBox.scrollTop++;

if(origin == scrollingBox.scrollTop){

if(!reachedBottom){

scrollingBox.innerHTML+=scrollingBox.innerHTML;

reachedBottom=true;

bottom=origin;

}else{

scrollingBox.scrollTop=bottom;

}

}

}


function over(){

clearInterval(scrollingInterval);

}

function out(){

scrollingInterval = setInterval("scrolling()",50);

}

</script>



<div class="scroll" id="xst">

<p><a href="http://www.17sucai.com/" target="_blank">jquery 文字滾動大全 scroll 支持文字或圖片 單行滾動 多行滾動 帶按鈕控制滾動</a></p>

<p><img width="150" height="150" alt="jquery 文字滾動大全 scroll 支持文字或圖片 單行滾動 多行滾動 帶按鈕控制滾動" src="images/1.jpg" /></p>

<p><a href="http://www.17sucai.com/" target="_blank">jquery 文字連續滾動 節奏感十足的齒輪式滾動圖片展示與文字內容特效展示</a></p>

<p><img width="150" height="150" alt="js文字滾動製作js scroll單排文字滾動向上間隔滾動" src="images/2.jpg" /></p>

<p><a href="http://www.17sucai.com/" target="_blank">jquery 文字特效霓虹燈文字效果使用jQuery和CSS</a></p>

<p><img width="150" height="150" alt="jquery 文字連續滾動 節奏感十足的齒輪式滾動圖片展示與文字內容特效展示" src="images/3.jpg" /></p>

<p><a href="http://www.17sucai.com/" target="_blank">js文字滾動製作js scroll單排文字滾動向上間隔滾動</a></p>

<p><img width="150" height="150" alt="jquery 文字特效霓虹燈文字效果使用jQuery和CSS" src="images/4.jpg" /></p>

<p><a href="http://www.17sucai.com/" target="_blank">js文字切換特效製作焦點文字帶濾鏡切換效果</a></p>

<p><a href="http://www.17sucai.com/" target="_blank">js文字特效製作js文字閃爍與文字變色效果</a></p>

<p><a href="http://www.17sucai.com/" target="_blank">js文字滾動插件製作雙行關聯向上文字間隙滾動</a></p>

</div>


</body>



效果:

閱讀全文

與如何做圖片滾動代碼相關的資料

熱點內容
帶有文字的圖片沙雕 瀏覽:403
動漫可愛圖片簡單女孩 瀏覽:974
翡翠福壽桃子高清圖片 瀏覽:999
跑步女生卡通圖片豎屏 瀏覽:663
冬至圖片配文字大全可保存 瀏覽:551
怎麼製作帶v的圖片 瀏覽:655
動漫貴妃醉酒圖片 瀏覽:30
動漫版英雄圖片 瀏覽:242
怎麼樣查圖片的來源 瀏覽:844
拼多多給商家發圖片如何添加 瀏覽:583
南宋古錢幣圖片及價格 瀏覽:930
一個閉眼的女孩和小魚的圖片 瀏覽:743
女生夜景背景頭像圖片 瀏覽:10
扭繩發型圖片 瀏覽:698
王子圖片動漫圖片 瀏覽:252
幼兒手工圖片大全簡單漂亮的 瀏覽:418
美貓加菲貓高清圖片 瀏覽:537
頁眉中圖片與文字居中 瀏覽:288
汽車拉花簡單圖片大全 瀏覽:742
動漫帶血女生圖片大全 瀏覽:269