帝国论坛帝国网站管理系统交流区模板/标签/插件共享交流[分享]给大家分享一个横向自适应宽屏的幻灯片 【本版专题贴子】  
 1/4     1 2 3 4 ›› ›|
主题:[分享]给大家分享一个横向自适应宽屏的幻灯片 [加入收藏夹]   

honglin
用户头衔:秀才

精华贴   :0
发贴数   :40
经验值   :347
注册时间:2007-09-14
信息 搜索 好友 发送悄悄话 精益求精-帝国网站管理系统7.5正式版开源发布】   [第 1 楼]
[分享]给大家分享一个横向自适应宽屏的幻灯片
先发上图片效果大家看看


效果我看了后感觉非常不错,所以给大家分享下,顺便将使用方法也写出来,以便我们帝国emcs的模板和这个幻灯片更好的使用

该效果代码一共两个js文件,jquery.js和superslide.2.1.js
css代码为

<style type="text/css">               
* {
        margin:0;
        padding:0;
        list-style:none;
}
body {
        background:#fff;
        font:normal 12px/22px 宋体;
        width:100%;
}
img {
        border:0;
}
a {
        text-decoration:none;
        color:#333;
}
a:hover {
        color:#1974A1;
}
#footer {
        text-align:center;
}
.fullSlide {
        width:100%;
        position:relative;
        height:410px;
        background:#000;
}
.fullSlide .bd {
        margin:0 auto;
        position:relative;
        z-index:0;
        overflow:hidden;
}
.fullSlide .bd ul {
        width:100% !important;
}
.fullSlide .bd li {
        width:100% !important;
        height:410px;
        overflow:hidden;
        text-align:center;
}
.fullSlide .bd li a {
        display:block;
        height:410px;
}
.fullSlide .hd {
        width:100%;
        position:absolute;
        z-index:1;
        bottom:0;
        left:0;
        height:30px;
        line-height:30px;
}
.fullSlide .hd ul {
        text-align:center;
}
.fullSlide .hd ul li {
        cursor:pointer;
        display:inline-block;
        *display:inline;
        zoom:1;
        width:42px;
        height:11px;
        margin:1px;
        overflow:hidden;
        background:#000;
        filter:alpha(opacity=50);
        opacity:0.5;
        line-height:999px;
}
.fullSlide .hd ul .on {
        background:#f00;
}
.fullSlide .prev,.fullSlide .next {
        display:block;
        position:absolute;
        z-index:1;
        top:50%;
        margin-top:-30px;
        left:15%;
        z-index:1;
        width:40px;
        height:60px;
        background:url(images/slider-arrow.png) -126px -137px #000 no-repeat;
        cursor:pointer;
        filter:alpha(opacity=50);
        opacity:0.5;
        display:none;
}
.fullSlide .next {
        left:auto;
        right:15%;
        background-position:-6px -137px;
}

</style>


大家可以直降将css复制到首页模板上,也可以自己建立css文件然后加载


首页幻灯片加载代码
<div class="fullSlide">
  <div class="bd">
    <ul>
      <li _src="url(images/1.jpg)" style="background:#E2025E center 0 no-repeat;"><a target="_blank" href="http://www.youzhan5.com"></a></li>
      <li _src="url(images/2.jpg)" style="background:#DED5A1 center 0 no-repeat;"><a target="_blank" href="http://www.youzhan5.com"></a></li>
      <li _src="url(images/3.jpg)" style="background:#B8CED1 center 0 no-repeat;"><a target="_blank" href="http://www.youzhan5.com"></a></li>
      <li _src="url(images/4.jpg)" style="background:#98918E center 0 no-repeat;"><a target="_blank" href="http://www.youzhan5.com"></a></li>
      <li _src="url(images/5.jpg)" style="background:#FEFF19 center 0 no-repeat;"><a target="_blank" href="http://www.youzhan5.com"></a></li>
    </ul>
  </div>
  <div class="hd">
    <ul>
    </ul>
  </div>
  <span class="prev"></span> <span class="next"></span> </div>
<script type="text/javascript">
jQuery(".fullSlide").hover(function() {
    jQuery(this).find(".prev,.next").stop(true, true).fadeTo("show", 0.5)
},
function() {
    jQuery(this).find(".prev,.next").fadeOut()
});
jQuery(".fullSlide").slide({
    titCell: ".hd ul",
    mainCell: ".bd ul",
    effect: "fold",
    autoPlay: true,
    autoPage: true,
    trigger: "click",
    startFun: function(i) {
        var curLi = jQuery(".fullSlide .bd li").eq(i);
        if ( !! curLi.attr("_src")) {
            curLi.css("background-image", curLi.attr("_src")).removeAttr("_src")
        }
    }
});
</script>

中间的这些就是我们需要自己根据网站用标签写的,很简单了,想必大家都会,制作列表模板,更换图片地址和网址即可!


<li _src="url(images/1.jpg)" style="background:#E2025E center 0 no-repeat;"><a target="_blank" href="http://www.youzhan5.com"></a></li>
      <li _src="url(images/2.jpg)" style="background:#DED5A1 center 0 no-repeat;"><a target="_blank" href="http://www.youzhan5.com"></a></li>
      <li _src="url(images/3.jpg)" style="background:#B8CED1 center 0 no-repeat;"><a target="_blank" href="http://www.youzhan5.com"></a></li>
      <li _src="url(images/4.jpg)" style="background:#98918E center 0 no-repeat;"><a target="_blank" href="http://www.youzhan5.com"></a></li>
      <li _src="url(images/5.jpg)" style="background:#FEFF19 center 0 no-repeat;"><a target="_blank" href="http://www.youzhan5.com"></a></li>


大家可以用灵动标签实现这个
[e:loop={栏目ID/专题ID,显示条数,操作类型,只显示有标题图片,附加SQL条件,显示排序}]
      <li _src=src="<?=$bqr[titlepic]?>" style="background:#FEFF19 center 0 no-repeat;"><a target="_blank" href="<?=$bqsr[titleurl]?>"></a></li>
[/e:loop]


好了,大家有什么不清楚了可以问我,教程也写的不好,只是个幻灯片分享,呵呵

演示地址:http://www.youzhan5.com/jiaoben/201511/87.html

下载:
大家下载后按照目录结构上传,首页模板按照上面说明修改即可!

[/code][code]

[/html][html]


上传以下附件:
[下载 *.rar](文件大小:488.39 KB,下载次数:170)

[该贴被修改 1 次,最后修改时间 2015-11-17 15:20:58 ]



2015-11-17 15:20:01 已设置保密 顶部 回复 引用 报告 编辑 删除

dongdudu
用户头衔:举人

精华贴   :0
发贴数   :625
经验值   :1688
注册时间:2015-01-27
信息 搜索 好友 发送悄悄话 免费开源-EBMA系统:更安全的MYSQL管理和备份系统】   [第 2 楼]

好,支持




2015-11-17 17:07:04 已设置保密 顶部 回复 引用 报告 编辑 删除

fzs
用户头衔:探花

精华贴   :0
发贴数   :2345
经验值   :7070
注册时间:2008-06-25
信息 搜索 好友 发送悄悄话 精益求精-帝国网站管理系统7.5正式版开源发布】   [第 3 楼]




不好意思说!
2015-11-17 20:29:08 已设置保密 顶部 回复 引用 报告 编辑 删除

zjg1210
用户头衔:举人

精华贴   :0
发贴数   :255
经验值   :1026
注册时间:2010-07-18
信息 搜索 好友 发送悄悄话 免费开源-EBMA系统:更安全的MYSQL管理和备份系统】   [第 4 楼]

赞一个,先留名以表支持。




2015-11-17 21:41:21 已设置保密 顶部 回复 引用 报告 编辑 删除

rerere
用户头衔:探花

精华贴   :0
发贴数   :5236
经验值   :16664
注册时间:2009-08-13
信息 搜索 好友 发送悄悄话 精益求精-帝国网站管理系统7.5正式版开源发布】   [第 5 楼]

支持楼主




2015-11-18 08:03:33 已设置保密 顶部 回复 引用 报告 编辑 删除

honglin
用户头衔:秀才

精华贴   :0
发贴数   :40
经验值   :347
注册时间:2007-09-14
信息 搜索 好友 发送悄悄话 免费开源-EBMA系统:更安全的MYSQL管理和备份系统】   [第 6 楼]

大家有不清楚的随时跟帖,发现灵动标签确实可以解决很多问题啊




2015-11-18 15:36:34 已设置保密 顶部 回复 引用 报告 编辑 删除

feier
用户头衔:探花

精华贴   :0
发贴数   :6751
经验值   :21098
注册时间:2008-07-31
信息 搜索 好友 发送悄悄话 精益求精-帝国网站管理系统7.5正式版开源发布】   [第 7 楼]

支持下




2015-11-19 07:59:36 已设置保密 顶部 回复 引用 报告 编辑 删除

applin123
用户头衔:书生

精华贴   :0
发贴数   :3
经验值   :13
注册时间:2015-11-18
信息 搜索 好友 发送悄悄话 免费开源-EBMA系统:更安全的MYSQL管理和备份系统】   [第 8 楼]

嗯,灵动标签确实使用起来方便很多,许多幻灯片都可以使用,以后我也给大家分享下




2015-11-19 14:22:29 已设置保密 顶部 回复 引用 报告 编辑 删除

水煮凉水
用户头衔:书生

精华贴   :0
发贴数   :31
经验值   :195
注册时间:2014-09-15
信息 搜索 好友 发送悄悄话 精益求精-帝国网站管理系统7.5正式版开源发布】   [第 9 楼]

那,必须顶一个!!



r
2015-11-19 15:42:04 已设置保密 顶部 回复 引用 报告 编辑 删除

水煮凉水
用户头衔:书生

精华贴   :0
发贴数   :31
经验值   :195
注册时间:2014-09-15
信息 搜索 好友 发送悄悄话 免费开源-EBMA系统:更安全的MYSQL管理和备份系统】   [第 10 楼]

优站网怎么下载的东西还需要解压密码??
能不能说一下密码多少啊楼主、、



r
2015-11-19 16:34:58 已设置保密 顶部 回复 引用 报告 编辑 删除
 1/4     1 2 3 4 ›› ›|

快速回复
内容

表情
使用EBB代码 使用smile代码 显示签名 自动分析url 自动分析img
     【进入高级模式】   (按 Ctrl+Enter 直接提交)
    顶部  加入收藏夹
关于帝国 | 广告服务 | 联系我们 | 法律声明 | 隐私条款 | 许可协议
Powered by: EBB Version 2.2.1