html輪播圖片
Ⅰ html如何選中圖片輪播
使用this來獲取當前點擊選中的圖片就可以了
Ⅱ html如何讓圖片輪播
<html> <head> <script type="text/javascript"> var ImageArray=new Array(3); ImageArray[0]="001.jpg"; ImageArray[1]="002.jpg"; Imag
希望來對自你有助
Ⅲ 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中圖片輪播怎麼弄
一、數字鍵控制代碼:
<divstyle="position:relative;top:-50px;left:240px;">
<ahref="javascript:show(1)"><spanid="I1"style="width:18px;text-align:left;background:gray">1</span></a>
<ahref="javascript:show(2)"><spanid="I2"style="width:18px;text-align:left;background-color:gray">2</span></a>
<ahref="javascript:show(3)"><spanid="I3"style="width:18px;text-align:left;background-color:gray">3</span></a>
<ahref="javascript:show(4)"><spanid="I4"style="width:18px;text-align:left;background-color:gray">4</span></a>
<ahref="javascript:show(5)"><spanid="I5"style="width:18px;text-align:left;background-color:gray">5</span></a>
<ahref="javascript:show(6)"><spanid="I6"style="width:18px;text-align:left;background-color:gray">6</span></a></div>
<scriptlanguage="javaScript">
varnowIndex=1;
varmaxIndex=6;
functionshow(index)
{
if(Number(index)){
clearTimeout(theTimer);
nowIndex=index;
}
for(vari=1;i<(maxIndex+1);i++){
if(i==nowIndex)
{document.getElementById('pic'+nowIndex).style.display='';
document.getElementById('I'+nowIndex).style.backgroundColor='red';}
else
{document.getElementById('pic'+i).style.display='none';
document.getElementById('I'+i).style.backgroundColor='gray';}
}{
if(nowIndex==maxIndex)
nowIndex=1;
else
nowIndex++;
}
theTimer=setTimeout('show()',3000);
}
</script>
</div>
二、圖片自動播放:
<divid="butong_net_left"style="overflow:hidden;width:1000px;">
<tablecellpadding="0"cellspacing="0"border="0">
<tr><tdid="butong_net_left1"valign="top"align="center">
<tablecellpadding="2"cellspacing="0"border="0">
<tralign="center">
Ⅳ HTML首頁怎麼加圖片輪播
可以通過輸入代碼來操作。
Ⅵ HTML圖片輪播代碼怎麼寫
()<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">
Ⅶ 靜態HTML的圖片輪播
bootstrop里有
<divid="myCarousel"class="carouselslide"style="width:600px;float:left">
<!--輪播(Carousel)指標-->
<olclass="carousel-indicators">
<lidata-target="#myCarousel"data-slide-to="0"class="active"></li>
<lidata-target="#myCarousel"data-slide-to="1"></li>
<lidata-target="#myCarousel"data-slide-to="2"></li>
</ol>
<!--輪播(Carousel)項目-->
<divclass="carousel-inner">
<divclass="itemactive">
<imgsrc="../img/bg.jpg"alt="Firstslide">
</div>
<divclass="item">
<imgsrc="../img/bg1.jpg"alt="Secondslide">
</div>
<divclass="item">
<imgsrc="../img/bg2.jpg"alt="Thirdslide">
</div>
</div>
<!--輪播(Carousel)導航-->
<aclass="carousel-controlleft"href="#myCarousel"data-slide="prev">‹</a>
<aclass="carousel-controlright"href="#myCarousel"
data-slide="next">›</a>
</div>
導包:
<scriptsrc="../js2/jquery-3.2.1.min.js"></script>
<scriptsrc="../js2/bootstrap.min.js"></script>
<linkrel="stylesheet"href="../css/bootstrap.min.css"type="text/css">
包去網路下,很好找
Ⅷ HTML圖片輪播怎麼做
let time = null;
let img_index = 0;
let node = '頁面中圖片輪播的滑塊區域元素';
let max_index = 4;
time = function (){
img_index += 1;
if(img_index >= max_index){
img_index = 0;
}
node.style.setProperty('transform','translateX(' + -(img_index * 100) + 'px)');
setTimeout(time,2000ms);
};
time();
Ⅸ 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">