dz图片幻灯 帖子图片列表左右滚动 模块模板 纯DIY,效果图:
DZ图片幻灯 帖子图片列表左右滚动 模块模板 纯DIY可用
分两个版本:
第一个需要根据不同的宽高调整代码
使用方法(以帖子内容页做说明,实际你可以任意添加到各种页面各种框架):
1.进入帖子内容页DIY模式添加3:1框架
2.给两个框架分别添加一个帖子模块,第一个帖子模块调用数据(附件模式,建议图片宽度158*200)建议4-10条,标题20字节,第二个建议8条数据
3.给框架,模块设置样式为无边框且无边距
4.分别将以下代码添加到对应的模块自定义样式中
图片列表:
- <style type="text/CSS">
- .bbf_slide_lr_1 {
- margin-bottom:10px;
- padding: 5px 35px;
- position: relative;
- border:1px solid #ccc;
- border-right:none;
- border-radius:5px;
- }
- ul.slideshow li {
- float: left;
- overflow: hidden;
- padding: 0 3px;
- text-align: center;
- }
- ul.slideshow li a{ display:block;}
- .slidebarbtn {
- display: block;
- font-family: Geneva,sans-serif;
- font-size: 36px;
- height: 80px;
- line-height: 80px;
- position: absolute;
- text-align: center;
- width: 28px;
- }
- .slidebarbtn:hover {
- text-decoration: none;
- }
- .slidebarbtn {
- background: none repeat scroll 0 0 #f2f2f2;
- border: 1px solid #cdcdcd;
- color: #333;
- border-radius: 5px;
- }
- .slidebarbtn:hover {
- background: none repeat scroll 0 0 #fcc9a4;
- border: 1px solid #cdcdcd;
- color: #fff;
- }
- .slidebarup {
- left: 5px;
- top: 66px;
- }
- .slidebardown {
- right: 5px;
- top: 66px;
- }
-
- .bbf_slide_lr_1 span,.bbf_slide_lr_1 em { position:absolute; left:3px; bottom:0; height:40px ; text-indent:5px; line-height:40px; font-size:16px; color:#000; overflow:hidden; }
- .ie_all .bbf_slide_lr_1 span, .ie_all .bbf_slide_lr_1 em { bottom:0px; }
- .bbf_slide_lr_1 span { background-color:#fff; opacity:.4;filter:alpha(opacity=40); }
- .bbf_slide_lr_1 a:hover span { background-color:#000; }
- .bbf_slide_lr_1 li:hover em { color:#fff; text-decoration:none; }
- .bbf_slide_lr_1 em:hover { color:#fff; text-decoration:none; }
-
- </style>
- <div class="slidebox bbf_slide_lr_1" slidenum="4" slidestep="3" > <!--4个,每次滚动3个-->
- <a class="slidebarbtn leftbtn slidebarup" mevent="click" href="javascript:void(0);"> <</a>
- <div class="middle cl" >
- <ul class="slideshow">
- [loop]
- <li style="width: {picwidth}px;">
- <a href="{url}" {target} title="{title}"><img src="{pic}" width="{picwidth}px" height="{picheight}px" alt="{title}" /> <span></span><em style="width:{picwidth}px;">{title}</em> </a>
- </li>
- [/loop]
- </ul>
- </div>
- <a class="slidebarbtn rightbtn slidebardown" mevent="click" href="javascript:void(0);">> </a>
- </div>
- <script type="text/javascript">
- runslideshow();
- </script>
复制代码 帖子列表:- <style type="text/css">
- .bbf_threadlist_26_16 { position: relative; border: 1px solid #ccc; border-left: none; border-radius: 5px; padding: 0px 5px; }
- .bbf_threadlist_26_16 em { position: absolute; right: 0; }
- .bbf_threadlist_26_16 li { height: 24px; overflow: hidden; }
- .bbf_threadlist_26_16 a.forum { color: #f60; font-size: 16px; }
- .bbf_threadlist_26_16 a.thread { height:24px; line-height: 26px; font-size:16px; }
- </style>
- <div class="module cl xl bbf_threadlist_26_16">
- <ul>
- [loop]
- <li><a class="forum" href="{forumurl}"> {forumname} | </a> <a class="thread" href="{url}" title="{title}"{target}>{title}</a></li>
- [/loop]
- </ul>
- </div>
复制代码 图片列表:- <style type="text/css">
- .bbf_slide_lr_1 {
- margin-bottom: 10px;
- padding: 5px 35px;
- position: relative;
- border: 1px solid #ccc;
- border-right: none;
- border-radius: 5px;
- }
- .bbf_slide_lr_1 li {
- float: left;
- overflow: hidden;
- padding: 0 3px;
- text-align: center;
- }
- .bbf_slide_lr_1 li a {
- display: block;
- }
- .bbf_slide_lr_1 .slidebarbtn {
- display: block;
- font-family: Geneva,sans-serif;
- font-size: 36px;
- height: 80px;
- line-height: 80px;
- position: absolute;
- text-align: center;
- width: 28px;
- background: none repeat scroll 0 0 #f2f2f2;
- border: 1px solid #cdcdcd;
- color: #333;
- border-radius: 5px;
- }
- .bbf_slide_lr_1 .slidebarbtn:hover {
- text-decoration: none;
- }
- .bbf_slide_lr_1 .slidebarbtn:hover {
- background: none repeat scroll 0 0 #fcc9a4;
- border: 1px solid #cdcdcd;
- color: #fff;
- }
- .bbf_slide_lr_1 .slidebarup {
- left: 5px;
- top: 66px;
- }
- .bbf_slide_lr_1 .slidebardown {
- right: 5px;
- top: 66px;
- }
- .bbf_slide_lr_1 em {
- position: absolute;
- left: 3px;
- bottom: 0;
- height: 40px;
- text-indent: 5px;
- line-height: 40px;
- font-size: 16px;
- color: #000;
- overflow: hidden;
- background-color: #fff;
- opacity: .4;filter:alpha(opacity=40);
- }
- .bbf_slide_lr_1 a:hover em {
- background-color: #000;
- }
- .bbf_slide_lr_1 li:hover em {
- color: #fff;
- text-decoration: none;
- }
- </style>
- <div class="slidebox bbf_slide_lr_1" slidenum="4" slidestep="3" > <!--4个,每次滚动3个-->
- <a class="slidebarbtn leftbtn slidebarup" mevent="click" href="javascript:void(0);"> <</a>
- <div class="middle cl" >
- <ul class="slideshow">
- [loop]
- <li style="width: {picwidth}px;">
- <a href="{url}" {target} title="{title}"><img src="{pic}" width="{picwidth}px" height="{picheight}px" alt="{title}" /><em>{title}</em> </a>
- </li>
- [/loop]
- [index=1]
- <li style="width: {picwidth}px;">
- <style type="text/css">
- .slidebarup,.slidebardown {top:top:calc({picheight}px/2 - 35px);top:-moz-calc({picheight}px/2 - 35px);top:-webkit-calc({picheight}px/2 - 35px);}
- .bbf_slide_lr_1 em {width:{picwidth}px;}
- </style>
- <a href="{url}" {target} title="{title}"><img src="{pic}" width="{picwidth}px" height="{picheight}px" alt="{title}" /><em>{title}</em></a>
- </li>
- [/index]
- </ul>
- </div>
- <a class="slidebarbtn rightbtn slidebardown" mevent="click" href="javascript:void(0);">> </a>
- </div>
- <script type="text/javascript">
- runslideshow();
- </script>
复制代码 帖子列表(和版本一的一样):
|