Discuz!官方免费开源建站系统

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索

[素材] 【今日更新3D幻灯】DZ百变幻灯 每天更新一款幻灯,今日更新3D幻灯

[复制链接]
天婷a 发表于 2011-11-30 15:35:06 | 显示全部楼层 |阅读模式
本帖最后由 天婷a 于 2011-12-2 09:11 编辑

给力 不给力就没力做事老

我不知道,我能更新到到少款幻灯,有空就来,没空就不来。先来一款,昨天我也发过一款,现在再来。
追求以最傻瓜的形式给出代码,力求降低用户使用成本。最好都是复制代码就能用,目前都可以是复制代码都能用,但我不知道以后会写什么咚咚,所以不知道能不能傻瓜式。



使用详细方法见9楼https://discuz.dismall.com/forum.php?mod=redirect&goto=findpost&ptid=2540975&pid=22459612


效果定做,请给我们留言,不用注册即可留言,收到有空了就做,http://www.admincg.com/tx/e/tool/feedback/?bid=6


1:这个幻灯的代码地址:http://www.admincg.com/thread-2482-1-1.html


你对你的空间商满意 吗?你网站速度怎么样?来,给你的空间投一票,让我们看看哪家空间最好。
点击免注册投票http://www.admincg.com/IDCtouPiao/

废话不说,直接来代码了。复制下面代码即可使用, 后台门户 模块模板那些东西,请参考相关帖子,这里不说怎么调用了。



  1. <style>
  2. .hpicccccccccc ul {margin:0;padding:0}
  3. .hpicccccccccc{ float:left; overflow:hidden; background-color:#000; padding:3px;}
  4. .hpicccccccccc li {list-style:none}
  5. .hpicccccccccc img {border:none;display:block}
  6. .slide-wp, .hpicccccccccc{ height:250px;}/*幻灯片高,根据你网页需要的大小来调整,不过太小了感觉不到3D效果*/
  7. .nav-wp, .slide-wp, .hpicccccccccc{ width:500px;}/*幻灯片的宽*/
  8. .slide-wp {
  9. overflow: hidden;
  10. position: absolute;
  11. }
  12. .nav-wp {
  13. position: absolute;
  14. background: #000;opacity:0.5; -moz-opacity:0.5; filter:alpha(opacity=50);
  15. margin-top: 222px;/*按钮所在高度随意调整*/
  16. padding: 0 0 6px 0;
  17. }
  18. .nav li {
  19. float: left;
  20. margin-left: 10px;
  21. font-size: 20px;
  22. font-weight: bold;
  23. font-family: tahoma;
  24. color: #22739e;
  25. cursor: pointer;
  26. height: 22px;
  27. }
  28. .nav li.cur{color: #ff7a00}
  29. .next { float:right;
  30. padding: 4px 8px;
  31. color: #ff7a00;
  32. height: 20px;
  33. cursor: pointer;
  34. }
  35. </style>

  36. <div class="hpicccccccccc">
  37. <div id="slider" class="slide-wp">
  38. <ul>
  39. [loop]
  40. <li><a href="{url}" target="_blank"><img src="{pic}" /></a></li>
  41. [/loop]
  42. </ul>
  43. </div>
  44. <div class="nav-wp">
  45. <ul id="nav" class="nav">
  46. <a class="next" onClick="mySlider.move()">next</a>
  47. <li onClick="mySlider.pos(0)">●</li>
  48. <li onClick="mySlider.pos(1)">●</li>
  49. <li onClick="mySlider.pos(2)">●</li>
  50. <li onClick="mySlider.pos(3)">●</li>
  51. <li onClick="mySlider.pos(4)">●</li>
  52. </ul>

  53. </div>
  54. </div>

  55. <script type="text/javascript">
  56. var HR = {
  57. $ : function(i) {return document.getElementById(i)},
  58. $$ : function(c, p) {return p.getElementsByTagName(c)},
  59. ce : function(i, t) {
  60. var o = document.createElement(i);
  61. t.appendChild(o);
  62. return o;
  63. }
  64. };
  65. HR.slider3D = function () {
  66. var init = function (o) {
  67. this.o = o;
  68. var wp = HR.$(o.id), ul = HR.$$('ul', wp)[0], li = this.li = HR.$$('li', ul);
  69. this.l = li.length;
  70. this.w = wp.offsetWidth;
  71. this.h = wp.offsetHeight;
  72. this.at = o.auto? o.auto : 4;
  73. var con = this.con = HR.ce('div', wp);
  74. con.style.cssText = 'position:absolute;left:0;top:0;width:'+this.w+'px;height:'+this.h+'px';
  75. ul.style['display'] = 'none';
  76. this.a1 = HR.ce('a', con);
  77. this.a1.style.cssText = 'position:absolute;left:0;top:0;overflow:hidden';
  78. this.a2 = HR.ce('a', con);
  79. this.a2.style.cssText = 'position:absolute;top:0;right:0;overflow:hidden';
  80. this.a1.innerHTML = this.a2.innerHTML = '<img alt="" />';
  81. this.img = HR.$$('img', ul);
  82. this.s = o.maskSize ? o.maskSize : 5;

  83. this.mask11 = HR.ce('span', this.a1);
  84. this.mask12 = HR.ce('span', this.a1);
  85. this.mask21 = HR.ce('span', this.a2);
  86. this.mask22 = HR.ce('span', this.a2);

  87. this.pos(0);
  88. }
  89. init.prototype = {
  90. pos : function (i) {
  91. clearInterval(this.li[i].a); clearInterval(this.au); this.au = 0; this.cur = i;
  92. var navli = HR.$$('li', HR.$(this.o.navId));
  93. for (var j=0; j<navli.length; j++) {
  94. navli[j].className = i == j ? 'cur' : '';
  95. }
  96. var img1 = HR.$$('img', this.a1)[0], img2 = HR.$$('img', this.a2)[0], _this = this;
  97. img1.src = i==0 ? this.img[this.l-1].src : this.img[i-1].src;
  98. img1.width = this.w;
  99. img2.src = this.img[i].src;
  100. img2.width = 0;
  101. img1.height = img2.height = this.h;
  102. this.mask11.style.cssText = 'position:absolute;left:0;top:0;font-size:0;overflow:hidden;width:0;height:0;border-color:black transparent transparent black;border-style:solid dashed dashed solid;border-width:0 '+this.w/2+'px';
  103. this.mask12.style.cssText = 'position:absolute;left:0;bottom:0;font-size:0;overflow:hidden;width:0;height:0;border-color:transparent transparent black black;border-style:dashed dashed solid solid;border-width:0 '+this.w/2+'px';
  104. this.mask21.style.cssText = 'position:absolute;right:0;top:0;font-size:0;overflow:hidden;width:0;height:0;border-color:black black transparent transparent;border-style:solid solid dashed dashed;border-width:0px';
  105. this.mask22.style.cssText = 'position:absolute;right:0;bottom:0;font-size:0;overflow:hidden;width:0;height:0;border-color:transparent black black transparent;border-style:dashed solid solid dashed;border-width:0px';
  106. this.li[i].a = setInterval(function(){_this.anim(i)}, 20);
  107. },
  108. anim : function (i) {
  109. var w1 = HR.$$('img', this.a1)[0].width, w2 = HR.$$('img', this.a2)[0].width;
  110. if (w2 == this.w) {
  111. clearInterval(this.li[i].a);
  112. HR.$$('img', this.a1)[0].width = 0;
  113. HR.$$('img', this.a2)[0].width = this.w;
  114. this.mask11.style.borderLeftWidth = this.mask11.style.borderRightWidth = this.mask12.style.borderLeftWidth = this.mask12.style.borderRightWidth = '0px';
  115. this.mask11.style.borderTopWidth = this.mask11.style.borderBottomWidth = this.mask12.style.borderTopWidth = this.mask12.style.boderBottomWidth = this.h/this.s + 'px';
  116. this.mask21.style.borderLeftWidth = this.mask21.style.borderRightWidth = this.mask22.style.borderLeftWidth = this.mask22.style.bordrRightWidth = this.w/2 + 'px';
  117. this.mask21.style.borderTopWidth = this.mask21.style.borderBottomWidth = this.mask22.style.borderTopWidth = this.mask22.style.borderBottomWidth = '0px';
  118. }else {
  119. HR.$$('img', this.a1)[0].width -= Math.ceil((this.w-w2)*.13);
  120. HR.$$('img', this.a2)[0].width += Math.ceil((this.w-w2)*.13);
  121. this.mask11.style.borderLeftWidth = this.mask11.style.borderRightWidth = this.mask12.style.borderLeftWidth = this.mask12.style.bordightWidth = HR.$$('img', this.a1)[0].width/2 + 'px';
  122. this.mask11.style.borderTopWidth = this.mask11.style.borderBottomWidth = this.mask12.style.borderTopWidth = this.mask12.style.borderBottomWidth = HR.$$('img', this.a2)[0].width*this.h/(this.s*this.w) + 'px';
  123. this.mask21.style.borderLeftWidth = this.mask21.style.borderRightWidth = this.mask22.style.borderLeftWidth = this.mask22.style.borderRightWidth = HR.$$('img', this.a2)[0].width/2 + 'px';
  124. this.mask21.style.borderTopWidth = this.mask21.style.borderBottomWidth = this.mask22.style.borderTopWidth = this.mask22.style.borderBottomWidth = this.h/this.s - HR.$$('img', this.a2)[0].width*this.h/(this.s*this.w) + 'px';
  125. if (!this.au) this.auto();
  126. }
  127. },
  128. auto : function () {
  129. var _this = this;
  130. this.au = setInterval(function(){_this.move()}, this.at*1000);
  131. },
  132. move : function () {
  133. var n = this.cur==this.l-1 ? 0 : this.cur+1;
  134. this.pos(n);
  135. }
  136. }
  137. return init;
  138. }();
  139. var mySlider = new HR.slider3D({
  140. id: 'slider',
  141. maskSize: 6,
  142. navId: 'nav',
  143. auto: 4
  144. })</script>
复制代码



这里也不解答任何问题,没有那么多时间。要工作的,

如复制代码不可用,可能有些空格符号什么的变了,请下载源文件,用DW打开文档,就可以获得精准代码了。
源文件下载和演示地址http://www.admincg.com/tx/huandengshichuang/20111201/194.html
有问题,高级修改方法,请到草根论坛发帖留http://www.admincg.com
使用实例http://www.5200760.com








本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

x
无效楼层,该帖已经被删除
@小脚踏溪园 发表于 2011-11-30 17:48:31 | 显示全部楼层
强哥地板www.qz5156.com
回复

使用道具 举报

jxhjjm 发表于 2011-11-30 18:11:58 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
回复

使用道具 举报

种菜收菜 发表于 2011-11-30 19:29:16 | 显示全部楼层
回复

使用道具 举报

 楼主| 天婷a 发表于 2011-12-1 21:12:05 | 显示全部楼层
【今日更新3D幻灯】更多的,现在美丽了,等大家给力才有力做{:soso_e102:}
回复

使用道具 举报

yage68 发表于 2011-12-1 21:37:32 | 显示全部楼层
不错的贴,顶一下吧
回复

使用道具 举报

wqslh 发表于 2011-12-1 21:42:21 | 显示全部楼层
很偏凉
回复

使用道具 举报

 楼主| 天婷a 发表于 2011-12-1 22:08:45 | 显示全部楼层
好吧,说详细的使用方法,哎,这些帖子都很多多,看图你就懂了。

调用帖子,比附包含图片。显示数量要和代码相等,显示太多了,可能会变形


















本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

x
回复

使用道具 举报

81336388 发表于 2011-12-1 22:26:23 | 显示全部楼层
不知道啊,不知道。     http://www.c9c9gua.com
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|Discuz! 官方站 ( 皖ICP备16010102号 )star

GMT+8, 2024-9-29 09:36 , Processed in 0.143445 second(s), 18 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表