當前位置:首頁 » 操作系統 » 輪播圖源碼

輪播圖源碼

發布時間: 2022-02-08 05:20:10

⑴ HTML輪播圖片代碼,帶解釋

<!DOCTYPE HTML>

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

<title>五圖三屏輪播js特效代碼</title>

<meta name="Keywords" content="五圖三屏輪播js特效代碼" />

<meta name="description" content="五圖三屏輪播js特效代碼" />

<link href="http://img.chinaz.com/max-templates/passport/styles/topbar.css" type="text/css" rel="Stylesheet" />

<link href="/style/style_kj.css" type="text/css" rel="stylesheet" />

<link href="/style/demo.css" type="text/css" rel="stylesheet" />

<script type="text/javascript" src="/style/js/jquery-1.2.pack.js"></script>

<script type="text/javascript">

var theme_list_open = false;

$(document).ready(function () {

function fixHeight() {

var headerHeight = $("#switcher").height();

$("#iframe").attr("height", $(window).height()-84 + "px");

}

$(window).resize(function () {

fixHeight();

}).resize();

//響應式預覽

$('.icon-monitor').addClass('active');

$(".icon-mobile-3").click(function () {

$("#by").css("overflow-y", "auto");

$('#iframe-wrap').removeClass().addClass('mobile-width-3');

$('.icon-tablet,.icon-mobile-1,.icon-monitor,.icon-mobile-2,.icon-mobile-3').removeClass('active');

$(this).addClass('active');

return false;

});

$(".icon-mobile-2").click(function () {

$("#by").css("overflow-y", "auto");

$('#iframe-wrap').removeClass().addClass('mobile-width-2');

$('.icon-tablet,.icon-mobile-1,.icon-monitor,.icon-mobile-2,.icon-mobile-3').removeClass('active');

$(this).addClass('active');

return false;

});

$(".icon-mobile-1").click(function () {

$("#by").css("overflow-y", "auto");

$('#iframe-wrap').removeClass().addClass('mobile-width');

$('.icon-tablet,.icon-mobile,.icon-monitor,.icon-mobile-2,.icon-mobile-3').removeClass('active');

$(this).addClass('active');

return false;

});

$(".icon-tablet").click(function () {

$("#by").css("overflow-y", "auto");

$('#iframe-wrap').removeClass().addClass('tablet-width');

$('.icon-tablet,.icon-mobile-1,.icon-monitor,.icon-mobile-2,.icon-mobile-3').removeClass('active');

$(this).addClass('active');

return false;

});

$(".icon-monitor").click(function () {

$("#by").css("overflow-y", "hidden");

$('#iframe-wrap').removeClass().addClass('full-width');

$('.icon-tablet,.icon-mobile-1,.icon-monitor,.icon-mobile-2,.icon-mobile-3').removeClass('active');

$(this).addClass('active');

return false;

});

});

</script>

<script type="text/javascript">

function Responsive($a) {

if ($a == true) $("#Device").css("opacity", "100");

if ($a == false) $("#Device").css("opacity", "0");

$('#iframe-wrap').removeClass().addClass('full-width');

$('.icon-tablet,.icon-mobile-1,.icon-monitor,.icon-mobile-2,.icon-mobile-3').removeClass('active');

$(this).addClass('active');

return false;

};

</script>

</head>

<body id="by" style="overflow-y: hidden" >

<div id="switcher">

<div class="center">

<ul>

<li class="logoTop">在線預覽!</li>

<div id="Device">

<li class="device-monitor"><a href="javascript:"><div class="icon-monitor"></div></a></li>

<li class="device-mobile"><a href="javascript:"><div class="icon-tablet"> </div></a></li>

<li class="device-mobile"><a href="javascript:"><div class="icon-mobile-1"> </div></a></li>

<li class="device-mobile-2"><a href="javascript:"><div class="icon-mobile-2"> </div></a></li>

<li class="device-mobile-3"><a href="javascript:"><div class="icon-mobile-3"> </div></a></li>

</div>

</ul>

<div class="muen_top">

<a href="/" class="indexactive">首頁</a>

<a href="/tupian/" class="l11active" target="_blank">高清圖片</a>

<a href="/moban/" class="l12active" target="_blank">模板</a>

<a href="/ppt/" class="l726active" target="_blank">ppt模板</a>

<a href="/tubiao/" class="l49active" target="_blank">圖標</a>

<a href="/kuzhan/" class="l713active" target="_blank">酷站</a>

<a href="http://font.chinaz.com/" class="l13active" target="_blank">字體</a>

<a href="/psd/" class="l713active" target="_blank">PSD素材</a>

<a href="/shiliang/" class="l15active" target="_blank">矢量圖</a>

<a href="/yinxiao/" class="l713active" target="_blank">音效</a>

<a href="/biaoqing/" class="l560active" target="_blank">表情</a>

<a href="http://desk.chinaz.com/" class="l713active" target="_blank">壁紙</a>

<a href="/donghua/" class="l653active" target="_blank">動畫</a>

<a href="/jiaoben/" target="_blank">腳本</a>

<a href="/zhuanti/" target="_blank">專題</a>

</div>

<div class="tougao">

<a href="http://sc.chinaz.com/tougao.html" target="_blank">我要投稿</a>

</div>

</div>

</div>

<div id="iframe-wrap">

<iframe id="iframe" src="http://demo.sc.chinaz.com//Files/DownLoad/webjs1/201604/jiaoben4160/" frameborder="0" width="100%"> </iframe>

</div>

<div id="footer-notice" class="kj_bottom">

<div style=" width:980px; margin:0 auto">

<p class="left cut">

<span>名稱:</span>

<a href="/jiaoben/160419378420.htm" title="點擊下載" class="down" target="_blank">五圖三屏輪播js特效代碼</a>

<span>類型:</span>

<a href="/jiaoben/" title="腳本" target="_blank">腳本</a>

<span>標簽:</span><a href="/tag_jiaoben/js.html" target="_blank">js</a><a href="/tag_jiaoben/JiuGongGe.html" target="_blank">九宮格</a><a href="/tag_jiaoben/TuPianQieHuan.html" target="_blank">圖片切換</a><a href="/tag_jiaoben/TuPianLunBo.html" target="_blank">圖片輪播</a>

</p>

<p class="left">

<span>分享到:</span>

<a title='分享到新浪微博' href="javascript:void(0)" id="fxwb" class="sn">新浪</a>

<a title='分享到騰訊微博' href='javascript:void(0)' onclick=posttoWb() class="tx">騰訊</a>

<a title="分享到QQ空間" href="javascript:window.open('http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url='+encodeURIComponent(document.location.href));void(0)" class="qq">QQ空間</a>

</p>

<div class="clear"></div>

</div>

</div>

<script type="text/javascript">

var description = '五圖三屏輪播js特效代碼: 五圖三屏輪播js特效代碼是一款ZHIME織蜜內衣絲襪五圖三屏圖片切換特效。';

var sendT = {

getHeader: function () {

var g_title = description;

var re = /<[^<>]*?font[^<>]*?>/gi;

g_title = g_title.replace(re, "");

return g_title;

},

getFirstImgSrc: function () {

var allPageTags = document.getElementsByTagName("div");

for (var i = 0; i < allPageTags.length; i++) {

if (allPageTags[i].className == 'downtext') {

if (allPageTags[i].getElementsByTagName("img")[0] && allPageTags[i].getElementsByTagName("img")[0].width > 200) {

return allPageTags[i].getElementsByTagName("img")[0].src;

}

else {

return null;

}

}

}

},

getContent: function () {

var allPageTagss = document.getElementsByTagName("div");

for (var i = 0; i < allPageTagss.length; i++) {

if (allPageTagss[i].className == 'downtext') {

return allPageTagss[i].innerHTML;

}

}

}

}

document.getElementById("fxwb").onclick = function () {

(function (s, d, e, r, l, p, t, z, c) {

var f = 'http://service.weibo.com/share/share.php?appkey=872996044&', u = z || d.location, p = ['url=', e(u), '&title=', e(sendT.getHeader()), '&source=', e(r), '&sourceUrl=', e(l), '&content=', c || 'gb2312', '&pic=', e(p || '')].join('');

function a() {

if (!window.open([f, p].join(''), 'mb', ['toolbar=0,status=0,resizable=1,width=440,height=430,left=', (s.width - 440) / 2, ',top=', (s.height - 430) / 2].join(''))) u.href = [f, p].join('');

};

if (/Firefox/.test(navigator.userAgent)) setTimeout(a, 0); else a();

})(screen, document, encodeURIComponent, 'CHINAZ', 'http://sc.chinaz.com/', sendT.getFirstImgSrc(), null, null, null);

}

function posttoWb() {

var _tt = description;

var _t = encodeURI(_tt.replace(/\s+$/, ''));

var _url = encodeURI(window.location);

var _appkey = encodeURI("");

var _site = encodeURI('sc.chinaz.com');

var _pic = sendT.getFirstImgSrc();

var _u = 'http://v.t.qq.com/share/share.php?title=' + _t + '&url=' + _url + '&appkey=' + _appkey + '&site=' + _site + '&pic=' + _pic;

window.open(_u, '轉播到騰訊微博', 'width=700, height=580, top=320, left=180, toolbar=no, menubar=no, scrollbars=no, location=yes, resizable=no, status=no');

}

</script>

<script type="text/javascript" src="/js/softinfo.js.aspx?id=534084" defer="defer" charset="UTF-8"></script>

<div style="display:none">

<script src="http://s4.cnzz.com/stat.php?id=300636&web_id=300636" language="JavaScript"></script>

</div>

</body>

</html>
自己修改一下就可以了

⑵ 網頁HTML代碼製作輪播圖效果

用marquee 這個是沒法解決的,網上現在的解決辦法都是 javascript+css 來解決

你可也搜索一下 焦點圖 或是焦點輪轉圖,有很多的jquery 的插件 或是javascript 原生代碼,
這個原理也不是控制table 而是控制div 樣式層 id 、 class 的樣式表來,做的輪轉。

⑶ HTML圖片輪播代碼怎麼寫

(1)<div id="butong_net_left" style="overflow:hidden;width:1000px。

(2)"> <table cellpadding="0" cellspacing="0" border="0"> <tr><td id="butong_net_left1" valign="top" align="center"> <table cellpadding="2" cellspacing="0" border="0"> <tr align="center">

⑷ 求CSS圖片輪播完整代碼

以4張圖片為例:
1.基本布局:
將4張圖片左浮動橫向並排放入一個div容器內,圖片設置統一尺寸,div寬度設置4個圖片的總尺寸,然後放入相框容器div,
相框設置1個圖片的大小並設置溢出隱藏,以保證正確顯示一個照片。
2.設置動畫:
然後使用css3動畫,通過對photos進行位移,從而達到顯示不同的圖片,每次偏移一個圖片的寬度,即可顯示下一張圖片。
4張圖片,需要切換3次.
根據需要可以對各個圖片添加相應的序號和圖片簡介。

3.代碼如下:

復制代碼

1 <style>
2 #frame{position:absolute;width:300px;height:200px;overflow:hidden;border-radius:5px}
3 #dis{position:absolute;left:-50px;top:-10px;opacity:.5}
4 #dis li{display:inline-block;width:200px;height:20px;margin:0 50px;float:left;text-align:center;color:#fff;border-radius:10px;background:#000}
5 #photos img{float:left;width:300px;height:200px}
6 #photos { position: absolute;z-index:9; width: calc(300px * 4);/*---修改圖片數量的話需要修改下面的動畫參數*/ }
7 .play{ animation: ma 20s ease-out infinite alternate;}
8 @keyframes ma {
9 0%,25% { margin-left: 0px; }
10 30%,50% { margin-left: -300px; }
11 55%,75% { margin-left: -600px; }
12 80%,100% { margin-left: -900px; }
13
14 }
15 </style>

復制代碼
復制代碼

<div id="frame" >
<div id="photos" class="play">
<img src="images/1.jpg" >
<img src="images/3.jpg" >
<img src="images/4.jpg" >
<img src="images/5.jpg" >
<ul id="dis">
<li>www.scxhdzs.com#www.scxhdzs.com#111</li>
<li>22222222222222</li>
<li>33333333333333</li>
<li>44444444444444</li>
</ul>
</div>
</div>
拿走不謝!

⑸ HTML圖片輪播代碼怎麼寫

html部分

<divid="container">
<divclass="sections">
<divclass="section"id="section0"><h3>thisisthepage1</h3></div>
<divclass="section"id="section1"><h3>thisisthepage2</h3></div>
<divclass="section"id="section2"><h3>thisisthepage3</h3></div>
<divclass="section"id="section3"><h3>thisisthepage4</h3></div>
</div>
</div>

css部分

*{
padding:0;
margin:0;
}
html,body{
height:100%;
}
#container{
width:100%;
height:500px;
overflow:hidden;
}
.sections,.section{
height:100%;
}
#container,.sections{
position:relative;
}
.section{
background-color:#000;
background-size:cover;
background-position:50%50%;
text-align:center;
color:white;
}
#section0{
background-image:url('images/1.jpg');
}
#section1{
background-image:url('images/2.jpg');
}
#section2{
background-image:url('images/3.jpg');
}
#section3{
background-image:url('images/4.jpg');
}
.pagesli{list-style-type:none;width:10px;height:10px;border-radius:10px;background-color:white}.pagesli:hover{box-shadow:005px2pxwhite}.pagesli.active{background-color:orange;box-shadow:005px2pxorange}.pages{position:absolute;z-index:999}.pages.horizontal{left:50%;transform:translateX(-50%);bottom:5px}.pages.horizontalli{display:inline-block;margin-right:10px}.pages.horizontalli:last-child{margin-right:0}.pages.vertical{right:5px;top:50%;transform:translateY(-50%)}.pages.verticalli{margin-bottom:10px}.pages.verticalli:last-child{margin-bottom:0}

JS部分

<scriptsrc="js/jquery-1.11.0.min.js"type="text/javascript"></script>
//引入pageSwitch.min.js
<script>
$("#container").PageSwitch({
direction:'horizontal',
easing:'ease-in',
ration:1000,
autoPlay:true,
loop:'false'
});
</script>

⑹ 輪播圖片代碼修改

試試這個圖片輪播

有12345數字一起切換

有小圖大圖一起切換

裡面有教程和源碼

⑺ 淘寶詳情頁里輪播圖代碼

這個的話,要麼你自己很會寫代碼。要麼你的店鋪要開通CSS的呢,如果你是用DW做好上傳至淘寶的話,可能會被淘寶系統自動過濾掉 的 一般來說,在寶貝詳情頁這樣的很難做到。 希望能幫到您。

⑻ HTML關於輪播圖代碼

<divid="demo">
<tableborder=0align=centercellpadding=1cellspacing=1cellspace=0style="margin:0;padding:0">
<tr>
<tdvalign=topbgcolor=ffffffid=marquePic1>
<tablewidth='100%'border='0'cellspacing='0'>
<tr>
<tdalign=center><ahref='#'><imgsrc="images/zs001.png"width=300height=180border=0><br><br></a></td>
<tdalign=center><ahref='#'><imgsrc="images/zs001.png"width=300height=180border=0><br><br></a></td>
</tr>
</table>
</td>
<tdid=marquePic2valign=top></td>
</tr>
</table>
</div>
<scripttype="text/javascript">
varspeed=20
marquePic2.innerHTML=marquePic1.innerHTML
functionMarquee(){
if(demo.scrollLeft>=marquePic1.scrollWidth){
demo.scrollLeft=0
}
else
{
demo.scrollLeft++
}
}
varMyMar=setInterval(Marquee,speed)
demo.onmouseover=function(){clearInterval(MyMar)}
demo.onmouseout=function(){MyMar=setInterval(Marquee,speed)}
</script>

.demo{width:100%;height:auto;margin:auto;text-align:center;}
#demo{width:1180px;height:180px;overflow:hidden;clear:both;margin:auto}

⑼ 求php圖片輪播代碼

<?php

$setimg = Array (
'234.gif',
'345.gif',
'456.gif',
'567.gif',
'678.gif' // 順序加入

$num = rand(0,4); // 設定隨機數值

$link = "./" . $setimg[$num];
header("Location: ".$link);

?>

希望對你有幫助

⑽ html代碼能實現JS圖片輪播代碼的效果嗎急求

我沒上過淘寶開過店,不清楚你說的淘寶不支持JS代碼是什麼意思,是不支持一定程度么?那也不清楚支持到什麼程度,這樣寫出代碼就很難,應該標准太模糊,不知道怎麼寫他能支持.如果你能把你看到可以實現這效果的店鋪地址發我
我或許能幫你,把他的代碼解析給你

熱點內容
安卓外部資源怎麼下載 發布:2024-03-29 04:01:17 瀏覽:244
華為被加密碼的相冊在哪裡查看 發布:2024-03-29 04:00:27 瀏覽:747
自動欣悅版有哪些配置 發布:2024-03-29 03:48:26 瀏覽:287
如何用腳本搶 發布:2024-03-29 03:01:59 瀏覽:120
火影忍者手游配置怎麼調 發布:2024-03-29 02:53:53 瀏覽:103
編程畫櫻花 發布:2024-03-29 02:11:24 瀏覽:473
騰訊雲伺服器1mb老掉線 發布:2024-03-29 01:56:11 瀏覽:215
執行sql語句的存儲過程 發布:2024-03-29 01:52:37 瀏覽:697
婚紗攝影腳本 發布:2024-03-29 01:47:40 瀏覽:901
我的世界伺服器咋開外掛 發布:2024-03-29 01:07:45 瀏覽:456