日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

页面图片轮播完整代码

發(fā)布時間:2023/12/29 编程问答 23 豆豆
生活随笔 收集整理的這篇文章主要介紹了 页面图片轮播完整代码 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

完整頁面代碼如下,賦值到html頁面用瀏覽器打開就可以預覽圖片輪播效果:

?

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

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

<script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>

<style type="text/css">

/*圖片輪播*/

.box{

? ?margin-top: 20px;

? ?margin-left: 40px;

? ?height: 180px;

? ? background-color: white;

? ?position: relative;

? ?float: left;

}

.list{

? ?width: 300px;

? ?height: 150px;

? ?overflow: hidden;

? ?margin: 5px;

}

.next{

? ?right: 0;

}

.list li{

? ?position: absolute;

? ?top: 0;

? ?left: 0;

? ?list-style: none;

? ?opacity: 0;

? ?transition: all 0.3s ease-out;

}

.list img{

? ?border: 1px solid #DDD;

? ?float: left;

}

.list .p1{

? ?transform:translate3d(-100px,0,0) scale(0.70);

}

.list .p2{

? ?transform:translate3d(0px,0,0) scale(0.70);

? ?transform-origin:0 50%;

? ?opacity: 0.8;

? ?z-index: 2;

}

.list .p3{

? ?transform:translate3d(100px,0,0) scale(1);

? ?z-index: 3;

? ?opacity: 1;

}

.list .p4{

? ?transform:translate3d(200px,0,0) scale(0.70);

? ?transform-origin:100% 50%;

? ?opacity: 0.8;

? ?z-index: 2;

}

.list .p5{

? ?transform:translate3d(300px,0,0) scale(0.70);

}

.list .p6{

? ?transform:translate3d(400px,0,0) scale(0.70);

}

.list .p7{

? ?transform:translate3d(500px,0,0) scale(0.70);

}

?

.buttons{

?

?/* ?width: 600px;*/

? ?height: 30px;

? ?bottom: 0;

? ?margin-left: 0px;

? ?text-align: center;

? ?padding-top: 10px;

}

.buttons a{

? ?display: inline-block;

? ?width: 35px;

? ?height: 5px;

? ?padding-top: 4px;

? ?cursor: pointer;

}

?

.buttons span{

? ?display: block;

? ?width: 35px;

? ?height: 1px;

? ?background: #DDDDDD;

}

.buttons .blue{

? ?background: #62a60a;

}

/*圖片輪播結(jié)束*/

</style>

<title>圖片輪播演示</title>

<script>

js代碼:http://www.yayihouse.com/yayishuwu/chapter/2467

? ?</script>

</head>

?

<body>

<div ?class="box">

? <div class="list" >

? ? ?<ul>

? ? ? ?<li class="p1"><a href=""><img src="/static/images/survey_02.png" alt="" ? width="300" height="150" /></a></li>

? ? ? ? ? ? ? ? ? ? ?<li class="p2"><a href=""><img src="/static/images/survey_02.png" alt="" ? width="300" height="150" ?/></a></li>

? ? ? ? ? ? ? ? ? ? ?<li class="p3"><a href=""><img src="/static/images/survey_02.png" alt="" ? width="300" height="150" ?/></a></li>

? ? ? ? ? ? ? ? ? ? ?<li class="p4"><a href=""><img src="/static/images/survey_02.png" alt="" ? width="300" height="150" ?/></a></li>

? ? ? ? ? ? ? ? ? ? ?<li class="p5"><a href=""><img src="/static/images/survey_02.png" alt="" ? width="300" height="150" ?/></a></li>

? ? ? ? ? ? ? ? ? ? ?<li class="p6"><a href=""><img src="/static/images/survey_02.png" alt="" ? width="300" height="150" ?/></a></li>

? ? ? ? ? ? ? ? ? ? ?<li class="p7"><a href=""><img src="/static/images/survey_02.png" alt="" ? width="300" height="150" ?/></a></li>

? ? ? ? ? ? ? ? ? ?</ul>

? ? ? ? ? ? ? ? ?</div>

? ? ? ? ? ? ? ? ?<div class="buttons">

? ? ? ? ? ? ? ? ? ?<a href="javascript:;"><span></span></a>

? ? ? ? ? ? ? ? ? ?<a href="javascript:;"><span></span></a>

? ? ? ? ? ? ? ? ? ?<a href="javascript:;"><span></span></a>

? ? ? ? ? ? ? ? ? ?<a href="javascript:;"><span></span></a>

? ? ? ? ? ? ? ? ? ?<a href="javascript:;"><span></span></a>

? ? ? ? ? ? ? ? ? ?<a href="javascript:;"><span></span></a>

? ? ? ? ? ? ? ? ? ?<a href="javascript:;"><span></span></a>

? ? ? ? ? ? ? ? ?</div>

? ? ? ? ? ? ? ?</div>

</body>

</html>

總結(jié)

以上是生活随笔為你收集整理的页面图片轮播完整代码的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。