当前位置:首页 » 操作系统 » 轮播图源码

轮播图源码

发布时间: 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代码是什么意思,是不支持一定程度么?那也不清楚支持到什么程度,这样写出代码就很难,应该标准太模糊,不知道怎么写他能支持.如果你能把你看到可以实现这效果的店铺地址发我
我或许能帮你,把他的代码解析给你

热点内容
绿色linux 发布:2024-11-14 12:56:11 浏览:349
游戏本缓存 发布:2024-11-14 12:55:28 浏览:649
微软提供的编译软件 发布:2024-11-14 12:55:16 浏览:17
长沙java培训机构哪家好 发布:2024-11-14 12:40:53 浏览:228
外存储器硬盘能存储的高清电影数 发布:2024-11-14 12:33:23 浏览:265
python分号作用 发布:2024-11-14 12:31:50 浏览:223
方舟编译器下载要钱吗 发布:2024-11-14 12:29:20 浏览:62
jspoa源码 发布:2024-11-14 12:21:31 浏览:420
不记得了密码怎么办 发布:2024-11-14 12:18:58 浏览:442
python字符串的大小 发布:2024-11-14 12:17:24 浏览:222