Notice: Trying to access array offset on value of type bool in /www/wwwroot/weimahe.com/wp-content/advanced-cache.php on line 472

Notice: Trying to access array offset on value of type bool in /www/wwwroot/weimahe.com/wp-content/advanced-cache.php on line 472
[代码样式]用FlexSlider制作《枪神纪》幻灯片效果 - 微码盒
!
也想出现在这里? 联系我们
广告位

[代码样式]用FlexSlider制作《枪神纪》幻灯片效果

[代码样式]用FlexSlider制作《枪神纪》幻灯片效果

简介

这是模仿《枪神纪》官网首页的幻灯片,左边是图片,右边是标题导航。效果几乎一直,区别的是切换方式不一样,《枪神纪》官网的是鼠标移动到上面切换,模仿的是鼠标点击切换。因为这个幻灯片是使用 FlexSlider 制作的,而 FlexSlider 没有参数设置事件方式。

兼容性

兼容所有主流浏览器,包括 IE6。

制作方法

1、引入文件

<script src="https://www.dowebok.com/js/jquery.min.js"></script>
<script src="https://www.dowebok.com/js/jquery.flexslider-min.js"></script>

2、HTML

<div  class="slide-bar">
    <ul class="slides">
        <li><a href="###" rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow" ><img src="https://www.dowebok.com/images/img1.jpg" alt="img1"></a>
        <li><a href="###" rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow" ><img src="https://www.dowebok.com/images/img2.jpg" alt="img2"></a>
        <li><a href="###" rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow" ><img src="https://www.dowebok.com/images/img3.jpg" alt="img3"></a>
        <li><a href="###" rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow" ><img src="https://www.dowebok.com/images/img4.jpg" alt="img4"></a>
        <li><a href="###" rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow" ><img src="https://www.dowebok.com/images/img5.jpg" alt="img4"></a>
    </ul>
    <ul class="slide-caption">
        <li><a href="###" rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow" >最难忘的圣诞礼物 <span class="new">N</span></a></li>
        <li><a href="###" rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow" >百万Q币悬赏最强特工 <span class="hot">H</span></a></li>
        <li><a href="###" rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow" >挑战模式预告专题</a></li>
        <li><a href="###" rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow" >郭敬明新书免费看</a></li>
        <li><a href="###" rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow"  rel="external nofollow" >《艺术生存》上线</a></li>
    </ul>
</div>

如果你了解 FlexSlider 的话,就知道 FlexSlider 默认的 HTML 是没有 <ul class="slide-caption"> 的,我们这里加入是用来做自定义导航,就是右边的标题导航。

3、CSS

* { margin: 0; padding: 0;}
.slide-bar { position: relative; width: 550px; height: 230px; padding-right: 230px; margin: 0 auto; overflow: hidden;}
.slides img { display: block;}
.slide-caption { position: absolute; right: 0; top: 0; width: 230px; background-color: #0F1E26;}
.slide-caption li, .slide-caption a { display: block; width: 230px; height: 45px; border-bottom: 1px solid #1a2c34}
.slide-caption a { font: 14px/45px "Microsoft Yahei"; color: #a8a8a8; text-align: center; text-decoration: none; box-shadow: 5px -5px 18px #002436 inset;}
.slide-caption .flex-active a { color: #fff; background-color: #005278;}
.slide-caption .new { display: inline-block; width: 11px; height: 11px; font: 8px/11px "Microsoft Yahei"; background-color: #7fd416; color: #eee; vertical-align: text-top;}
.slide-caption .hot { display: inline-block; width: 11px; height: 11px; font: 8px/11px "Microsoft Yahei"; background-color: #da3434; color: #eee; vertical-align: text-top;}

4、JavaScript

$(window).load(function() {
    $('.slide-bar').flexslider({
        'animation' : 'slide',
        'direction' : 'vertical',
        'pauseOnHover' : true,
        'directionNav' : false,
        'manualControls' : '.slide-caption li'
    });
});

[b2_file link="

百度网盘" name="用FlexSlider制作《枪神纪》幻灯片效果" pass="" code=""]

给TA打赏
共{{data.count}}人
人已打赏
脚本代码

[代码样式]jQuery计时器插件TimeCircles

2020-10-27 14:47:27

脚本代码

[代码样式]shCircleLoader – jQuery Loading效果插件

2020-10-30 10:19:29

下载说明

  • 1、微码盒所提供的压缩包若无特别说明,解压密码均为weimahe.com
  • 2、下载后文件若为压缩包格式,请安装7Z软件或者其它压缩软件进行解压;
  • 3、文件比较大的时候,建议使用下载工具进行下载,浏览器下载有时候会自动中断,导致下载错误;
  • 4、资源可能会由于内容问题被和谐,导致下载链接不可用,遇到此问题,请到文章页面进行反馈,以便微码盒及时进行更新;
  • 5、其他下载问题请自行搜索教程,这里不一一讲解。

站长声明

本站大部分下载资源收集于网络,只做学习和交流使用,版权归原作者所有;若为付费资源,请在下载后24小时之内自觉删除;若作商业用途,请到原网站购买;由于未及时购买和付费发生的侵权行为,与本站无关。本站发布的内容若侵犯到您的权益,请联系本站删除,我们将及时处理!
0 条回复 A文章作者 M管理员
    暂无讨论,说说你的看法吧
个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索