现在最丰富的幻灯片切换代码在网上一抓一大把,但是功能简单好用的真的不多。
今天给大家演示的就是基于jquery和swiper的3D幻灯片切换效果。
废话不说,直接上代码。
首先在页面顶部需要引用jquery和swiper,swiper要使用4.0以上版本才有3D幻灯片切换的动态效果。
首先在网页的head标签内引用css和js类库文件,引用完了之后是调用方法
js代码完成之后,需要定义3D幻灯片的css效果,这些css代码通常定义在外部的css文件中
/*进入视频板块*/.index_videonew{position: relative;width: 100%;height: auto;overflow: hidden;}.index_videonew .index_videobtn2{ position: absolute;bottom: 4.6%;right: 0;display: inline-block;width: 24%;}.index_videonew .index_videobtn1{width: 1